Add a command-line option to allow function names with the "rs" prefix (--allow-rs-prefix). When not specified, user-defined functions with that prefix will be treated as an error.
Change-Id: Ieefc8bb55d61980241d5392ffb32770a303ce6a7
diff --git a/slang.hpp b/slang.hpp
index 0dbf00c..4f4ff44 100644
--- a/slang.hpp
+++ b/slang.hpp
@@ -131,7 +131,8 @@
mPragmas,
mOS.take(),
mOutputType,
- *mSourceMgr));
+ *mSourceMgr,
+ mAllowRSPrefix));
return;
}
@@ -144,7 +145,8 @@
mPragmas,
mOS.take(),
mOutputType,
- *mSourceMgr));
+ *mSourceMgr,
+ mAllowRSPrefix));
return;
}
@@ -158,6 +160,8 @@
/* Output stream */
llvm::OwningPtr<llvm::raw_ostream> mOS;
+ bool mAllowRSPrefix;
+
public:
static const std::string TargetDescription;
@@ -181,6 +185,10 @@
bool setOutput(const char* outputFile);
+ inline void allowRSPrefix() {
+ mAllowRSPrefix = true;
+ }
+
int compile();
bool reflectToJava(const char* outputPackageName);