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[]) {
49
49
50
50
locations.clear ();
51
51
52
- IR ir (libName);
53
- if (!Package.empty ()) {
54
- ir.setPackageName (Package.getValue ());
55
- }
56
-
52
+ IR ir (libName, Package.getValue ());
57
53
ScalaFrontendActionFactory actionFactory (ir);
58
54
59
55
int result = Tool.run (&actionFactory);
Original file line number Diff line number Diff line change 1
1
#include " IR.h"
2
2
#include " ../Utils.h"
3
3
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) {
5
6
if (this ->libName == " native" ) {
6
7
/* there are at most 3 objects in the file.
7
8
* All of them will have distinct names. */
@@ -207,10 +208,6 @@ bool IR::typeIsUsedOnlyInTypeDefs(std::string type) {
207
208
isTypeUsed (unions, type));
208
209
}
209
210
210
- void IR::setPackageName (std::string packageName) {
211
- this ->packageName = std::move (packageName);
212
- }
213
-
214
211
void IR::setScalaNames () {
215
212
/* Renaming according to Scala naming conventions
216
213
* should happen here */
Original file line number Diff line number Diff line change 11
11
*/
12
12
class IR {
13
13
public:
14
- explicit IR (std::string libName);
14
+ explicit IR (std::string libName, std::string packageName );
15
15
16
16
void addFunction (std::string name, std::vector<Parameter> parameters,
17
17
std::string, bool isVariadic);
@@ -39,8 +39,6 @@ class IR {
39
39
40
40
void generate (const std::string &excludePrefix);
41
41
42
- void setPackageName (std::string packageName);
43
-
44
42
private:
45
43
/* *
46
44
* Generates type defs for enums, structs and unions
You can’t perform that action at this time.
0 commit comments