aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-29 20:38:28 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-29 20:38:28 +0000
commitd249e1d1f1498b81314459ceda19d6ff25c278ad (patch)
tree64980c7c4974845750bbfefa695204a8feff0861 /lib/CodeGen/CGDebugInfo.cpp
parente540858b289b23653bcb23646f135729203635cb (diff)
Create a new PrintingPolicy class, which we pass down through the AST
printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 0c6ed4b889..049e716c7c 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -150,7 +150,9 @@ llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT,
uint64_t Align = M->getContext().getTypeAlign(BT);
uint64_t Offset = 0;
- return DebugFactory.CreateBasicType(Unit, BT->getName(), Unit, 0, Size, Align,
+ return DebugFactory.CreateBasicType(Unit,
+ BT->getName(M->getContext().getLangOptions().CPlusPlus),
+ Unit, 0, Size, Align,
Offset, /*flags*/ 0, Encoding);
}