summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-04 18:27:04 +0000
committerChris Lattner <sabre@nondot.org>2009-05-04 18:27:04 +0000
commit23d5a391956737547325cbb3efe1a5c09469e400 (patch)
tree38a1bfefda42ec531155714554f9111556062dcb /clang/lib/CodeGen/CGStmt.cpp
parente396f72ec70866ca38015ea65f4ddc454958545d (diff)
downloadbcm5719-llvm-23d5a391956737547325cbb3efe1a5c09469e400.tar.gz
bcm5719-llvm-23d5a391956737547325cbb3efe1a5c09469e400.zip
"Fix" a problem with debug info in the presence of always_inline
function calls. For a program like this: #include <stdio.h> static __inline__ __attribute__((always_inline)) int bar(int x) { return 4; } int main() { int X = bar(4); printf("%d\n", X); } clang was not outputing any debug info for the body of main(). This is because the backend is getting confused by the region_start/end that clang is emitting for block scopes. For now, just disable these (matching llvm-gcc), this stuff is in progress of rework anyway. llvm-svn: 70889
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 441047e1bc5..7f73c8886c2 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -126,7 +126,10 @@ RValue CodeGenFunction::EmitCompoundStmt(const CompoundStmt &S, bool GetLast,
if (DI) {
EnsureInsertPoint();
DI->setLocation(S.getLBracLoc());
- DI->EmitRegionStart(CurFn, Builder);
+ // FIXME: The llvm backend is currently not ready to deal with region_end
+ // for block scoping. In the presence of always_inline functions it gets so
+ // confused that it doesn't emit any debug info. Just disable this for now.
+ //DI->EmitRegionStart(CurFn, Builder);
}
// Keep track of the current cleanup stack depth.
@@ -141,7 +144,11 @@ RValue CodeGenFunction::EmitCompoundStmt(const CompoundStmt &S, bool GetLast,
if (DI) {
EnsureInsertPoint();
DI->setLocation(S.getRBracLoc());
- DI->EmitRegionEnd(CurFn, Builder);
+
+ // FIXME: The llvm backend is currently not ready to deal with region_end
+ // for block scoping. In the presence of always_inline functions it gets so
+ // confused that it doesn't emit any debug info. Just disable this for now.
+ //DI->EmitRegionEnd(CurFn, Builder);
}
RValue RV;
OpenPOWER on IntegriCloud