[llvm-commits] [llvm-gcc-4.2] r40571 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp toplev.c
Anton Korobeynikov
asl at math.spbu.ru
Sat Jul 28 11:28:31 PDT 2007
Author: asl
Date: Sat Jul 28 13:28:30 2007
New Revision: 40571
URL: http://llvm.org/viewvc/llvm-project?rev=40571&view=rev
Log:
Minor PCH-related fixes (will be propagated to 4.0 soon):
1. Don't call finish_aliases_2(), when PCH are written
2. Properly initialize LLVM machinery, when PCHs are used to produce another PCHs :)
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/toplev.c
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=40571&r1=40570&r2=40571&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Sat Jul 28 13:28:30 2007
@@ -234,7 +234,11 @@
delete PerModulePasses;
delete CodeGenPasses;
- createOptimizationPasses();
+ // Don't run codegen, when we should output PCH
+ if (!flag_pch_file)
+ createOptimizationPasses();
+ else
+ llvm_pch_write_init();
}
// Read LLVM Types string table
Modified: llvm-gcc-4.2/trunk/gcc/toplev.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/toplev.c?rev=40571&r1=40570&r2=40571&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/toplev.c (original)
+++ llvm-gcc-4.2/trunk/gcc/toplev.c Sat Jul 28 13:28:30 2007
@@ -1146,8 +1146,16 @@
lang_hooks.decls.final_write_globals ();
cgraph_varpool_assemble_pending_decls ();
+
+ /* LLVM LOCAL begin */
+#ifdef ENABLE_LLVM
+ if (!flag_pch_file)
+ finish_aliases_2 ();
+#else
finish_aliases_2 ();
-
+#endif
+ /* LLVM LOCAL end */
+
/* This must occur after the loop to output deferred functions.
Else the coverage initializer would not be emitted if all the
functions in this compilation unit were deferred. */
More information about the llvm-commits
mailing list