Commit 4e10aa2c by Jim Stichnoth

Subzero: Add -allow-extern as an alias for --allow-externally-defined-symbols.

Also remind the user of that option in IceConverter.cpp, similar to PNaClTranslator.cpp. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1408023004 .
parent afc92af5
...@@ -40,6 +40,10 @@ cl::opt<bool> AllowExternDefinedSymbols( ...@@ -40,6 +40,10 @@ cl::opt<bool> AllowExternDefinedSymbols(
"and __pnacl_pso_root)."), "and __pnacl_pso_root)."),
cl::init(false)); cl::init(false));
cl::alias AllowExternDefinedSymbolsA(
"allow-extern", cl::desc("Alias for --allow-externally-defined-symbols"),
cl::NotHidden, cl::aliasopt(AllowExternDefinedSymbols));
cl::opt<bool> AllowIacaMarks( cl::opt<bool> AllowIacaMarks(
"allow-iaca-marks", "allow-iaca-marks",
cl::desc("Allow IACA (Intel Architecture Code Analyzer) marks to be " cl::desc("Allow IACA (Intel Architecture Code Analyzer) marks to be "
...@@ -216,7 +220,7 @@ cl::opt<bool> UseSandboxing("sandbox", cl::desc("Use sandboxing")); ...@@ -216,7 +220,7 @@ cl::opt<bool> UseSandboxing("sandbox", cl::desc("Use sandboxing"));
cl::opt<std::string> VerboseFocusOn( cl::opt<std::string> VerboseFocusOn(
"verbose-focus", "verbose-focus",
cl::desc("Temporarily enable full verbosity for a specific function"), cl::desc("Override with -verbose=none except for the specified function"),
cl::init("")); cl::init(""));
cl::opt<Ice::FileType> OutFileType( cl::opt<Ice::FileType> OutFileType(
......
...@@ -872,6 +872,8 @@ void Converter::installGlobalDeclarations(Module *Mod) { ...@@ -872,6 +872,8 @@ void Converter::installGlobalDeclarations(Module *Mod) {
raw_string_ostream StrBuf(Buffer); raw_string_ostream StrBuf(Buffer);
StrBuf << "Function " << IceFunc->getName() StrBuf << "Function " << IceFunc->getName()
<< " has incorrect linkage: " << IceFunc->getLinkageName(); << " has incorrect linkage: " << IceFunc->getLinkageName();
if (IceFunc->isExternal())
StrBuf << "\n Use flag -allow-externally-defined-symbols to override";
report_fatal_error(StrBuf.str()); report_fatal_error(StrBuf.str());
} }
GlobalDeclarationMap[&Func] = IceFunc; GlobalDeclarationMap[&Func] = IceFunc;
...@@ -891,6 +893,8 @@ void Converter::installGlobalDeclarations(Module *Mod) { ...@@ -891,6 +893,8 @@ void Converter::installGlobalDeclarations(Module *Mod) {
raw_string_ostream StrBuf(Buffer); raw_string_ostream StrBuf(Buffer);
StrBuf << "Global " << Var->getName() StrBuf << "Global " << Var->getName()
<< " has incorrect linkage: " << Var->getLinkageName(); << " has incorrect linkage: " << Var->getLinkageName();
if (Var->isExternal())
StrBuf << "\n Use flag -allow-externally-defined-symbols to override";
report_fatal_error(StrBuf.str()); report_fatal_error(StrBuf.str());
} }
GlobalDeclarationMap[GV] = Var; GlobalDeclarationMap[GV] = Var;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment