[Lldb-commits] [lldb] 11ae9dd - [ClangASTContext] Remove a very old hack.
Davide Italiano via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 3 16:32:29 PST 2019
Author: Davide Italiano
Date: 2019-12-03T16:32:21-08:00
New Revision: 11ae9dd6576e02223e6eb10568af9e5cb45b7bc6
URL: https://github.com/llvm/llvm-project/commit/11ae9dd6576e02223e6eb10568af9e5cb45b7bc6
DIFF: https://github.com/llvm/llvm-project/commit/11ae9dd6576e02223e6eb10568af9e5cb45b7bc6.diff
LOG: [ClangASTContext] Remove a very old hack.
This was fixed in clang a while ago, and the rdar associated
is now closed.
Added:
Modified:
lldb/source/Symbol/ClangASTContext.cpp
Removed:
################################################################################
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index e683a0a9f4be..e6435a261174 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -15,24 +15,6 @@
#include <string>
#include <vector>
-
-// Clang headers like to use NDEBUG inside of them to enable/disable debug
-// related features using "#ifndef NDEBUG" preprocessor blocks to do one thing
-// or another. This is bad because it means that if clang was built in release
-// mode, it assumes that you are building in release mode which is not always
-// the case. You can end up with functions that are defined as empty in header
-// files when NDEBUG is not defined, and this can cause link errors with the
-// clang .a files that you have since you might be missing functions in the .a
-// file. So we have to define NDEBUG when including clang headers to avoid any
-// mismatches. This is covered by rdar://problem/8691220
-
-#if !defined(NDEBUG) && !defined(LLVM_NDEBUG_OFF)
-#define LLDB_DEFINED_NDEBUG_FOR_CLANG
-#define NDEBUG
-// Need to include assert.h so it is as clang would expect it to be (disabled)
-#include <assert.h>
-#endif
-
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTImporter.h"
#include "clang/AST/Attr.h"
@@ -54,13 +36,6 @@
#include "clang/Frontend/FrontendOptions.h"
#include "clang/Sema/Sema.h"
-#ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG
-#undef NDEBUG
-#undef LLDB_DEFINED_NDEBUG_FOR_CLANG
-// Need to re-include assert.h so it is as _we_ would expect it to be (enabled)
-#include <assert.h>
-#endif
-
#include "llvm/Support/Signals.h"
#include "llvm/Support/Threading.h"
More information about the lldb-commits
mailing list