File tree Expand file tree Collapse file tree 3 files changed +4
-13
lines changed
Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,7 @@ int main(int argc, char *argv[]) {
4949
5050 locations.clear ();
5151
52- IR ir (libName);
53- if (!Package.empty ()) {
54- ir.setPackageName (Package.getValue ());
55- }
56-
52+ IR ir (libName, Package.getValue ());
5753 ScalaFrontendActionFactory actionFactory (ir);
5854
5955 int result = Tool.run (&actionFactory);
Original file line number Diff line number Diff line change 11#include " IR.h"
22#include " ../Utils.h"
33
4- IR::IR (std::string libName) : libName(std::move(libName)) {
4+ IR::IR (std::string libName, std::string packageName)
5+ : libName(std::move(libName)), packageName(packageName) {
56 if (this ->libName == " native" ) {
67 /* there are at most 3 objects in the file.
78 * All of them will have distinct names. */
@@ -207,10 +208,6 @@ bool IR::typeIsUsedOnlyInTypeDefs(std::string type) {
207208 isTypeUsed (unions, type));
208209}
209210
210- void IR::setPackageName (std::string packageName) {
211- this ->packageName = std::move (packageName);
212- }
213-
214211void IR::setScalaNames () {
215212 /* Renaming according to Scala naming conventions
216213 * should happen here */
Original file line number Diff line number Diff line change 1111 */
1212class IR {
1313 public:
14- explicit IR (std::string libName);
14+ explicit IR (std::string libName, std::string packageName );
1515
1616 void addFunction (std::string name, std::vector<Parameter> parameters,
1717 std::string, bool isVariadic);
@@ -39,8 +39,6 @@ class IR {
3939
4040 void generate (const std::string &excludePrefix);
4141
42- void setPackageName (std::string packageName);
43-
4442 private:
4543 /* *
4644 * Generates type defs for enums, structs and unions
You can’t perform that action at this time.
0 commit comments