[llvm-commits] [llvm-gcc-4.2] r64842 - in /llvm-gcc-4.2/branches/Apple/Dib/gcc: llvm-backend.cpp llvm-debug.cpp
Bill Wendling
isanbard at gmail.com
Tue Feb 17 15:03:28 PST 2009
Author: void
Date: Tue Feb 17 17:03:28 2009
New Revision: 64842
URL: http://llvm.org/viewvc/llvm-project?rev=64842&view=rev
Log:
--- Merging (from foreign repository) r63640 into '.':
U gcc/llvm-debug.cpp
Modified:
llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-backend.cpp
llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-backend.cpp?rev=64842&r1=64841&r2=64842&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-backend.cpp Tue Feb 17 17:03:28 2009
@@ -265,6 +265,18 @@
}
void llvm_lang_dependent_init(const char *Name) {
+
+ // Each input file is encoded as a separate compile unit in LLVM
+ // debugging information output. However, many target specific tool chains
+ // prefer to encode only one compile unit in an object file. In this
+ // situation, the LLVM code generator will include debugging information
+ // entities in the compile unit that is marked as main compile unit. The
+ // code generator accepts maximum one main compile unit per module. If a
+ // module does not contain any main compile unit then the code generator
+ // will emit multiple compile units in the output object file.
+ if (TheDebugInfo)
+ TheDebugInfo->getOrCreateCompileUnit(main_input_filename, true);
+
if (Name)
TheModule->setModuleIdentifier(Name);
}
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp?rev=64842&r1=64841&r2=64842&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp Tue Feb 17 17:03:28 2009
@@ -847,9 +847,17 @@
else
LangTag = DW_LANG_C89;
+ const char *Flags = "";
+ // Do this only when RC_DEBUG_OPTIONS environment variable is set to
+ // a nonempty string. This is intended only for internal Apple use.
+ char * debugopt = getenv("RC_DEBUG_OPTIONS");
+ if (debugopt && debugopt[0])
+ Flags = get_arguments();
+
DICompileUnit NewCU = DebugFactory.CreateCompileUnit(LangTag, FileName,
Directory,
- version_string, isMain);
+ version_string, isMain,
+ optimize, Flags);
CU = NewCU.getGV();
return NewCU;
}
More information about the llvm-commits
mailing list