diff options
Diffstat (limited to 'gnu/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp b/gnu/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp index c3c925cde2f..04224e72679 100644 --- a/gnu/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp +++ b/gnu/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp @@ -44,8 +44,12 @@ llvm::MDNode *CodeGenTBAA::getRoot() { // if our LLVM IR is linked with LLVM IR from a different front-end // (or a different version of this front-end), their TBAA trees will // remain distinct, and the optimizer will treat them conservatively. - if (!Root) - Root = MDHelper.createTBAARoot("Simple C/C++ TBAA"); + if (!Root) { + if (Features.CPlusPlus) + Root = MDHelper.createTBAARoot("Simple C++ TBAA"); + else + Root = MDHelper.createTBAARoot("Simple C/C++ TBAA"); + } return Root; } |
