Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1087)

Unified Diff: src/llvm2ice.cpp

Issue 567703003: Allow ability to name unnamed global addresses in Subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits in patch set 4. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/PNaClTranslator.cpp ('k') | tests_lit/llvm2ice_tests/unnamed.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/llvm2ice.cpp
diff --git a/src/llvm2ice.cpp b/src/llvm2ice.cpp
index 986ff76ec4a2b2b8ca906dedbecb6fb6a4c629ec..ce700b7556bce165651b292aed7f6fc3625c3586 100644
--- a/src/llvm2ice.cpp
+++ b/src/llvm2ice.cpp
@@ -109,6 +109,18 @@ static cl::opt<NaClFileFormat> InputFileFormat(
clEnumValEnd),
cl::init(LLVMFormat));
+static cl::opt<std::string>
+ DefaultGlobalPrefix("default-global-prefix",
+ cl::desc("Define default global prefix for naming "
+ "unnamed globals"),
+ cl::init("Global"));
+
+static cl::opt<std::string>
+ DefaultFunctionPrefix("default-function-prefix",
+ cl::desc("Define default function prefix for naming "
+ "unnamed functions"),
+ cl::init("Function"));
+
static cl::opt<bool>
BuildOnRead("build-on-read",
cl::desc("Build ICE instructions when reading bitcode"),
@@ -143,6 +155,8 @@ int main(int argc, char **argv) {
Flags.DisableGlobals = DisableGlobals;
Flags.FunctionSections = FunctionSections;
Flags.UseSandboxing = UseSandboxing;
+ Flags.DefaultGlobalPrefix = DefaultGlobalPrefix;
+ Flags.DefaultFunctionPrefix = DefaultFunctionPrefix;
Ice::GlobalContext Ctx(Ls, Os, VMask, TargetArch, OptLevel, TestPrefix,
Flags);
« no previous file with comments | « src/PNaClTranslator.cpp ('k') | tests_lit/llvm2ice_tests/unnamed.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698