Skip to content

Commit fba4281

Browse files
committed
[lldb] Remove unconditional include of Swift header on generic code
DWARFDIE can be compiled without Swift support. (cherry picked from commit fdca57a)
1 parent 2e5f68f commit fba4281

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
#include "DWARFDebugInfoEntry.h"
1414
#include "DWARFDeclContext.h"
1515
#include "DWARFUnit.h"
16+
#ifdef LLDB_ENABLE_SWIFT
1617
#include "Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.h"
18+
#endif
1719
#include "lldb/Symbol/Type.h"
1820

1921
#include "llvm/ADT/iterator.h"
@@ -393,8 +395,7 @@ static void GetDeclContextImpl(DWARFDIE die,
393395

394396
// Add this DIE's contribution at the end of the chain.
395397
auto push_ctx = [&](CompilerContextKind kind, llvm::StringRef name) {
396-
// BEGIN SWIFT
397-
//
398+
#ifdef LLDB_ENABLE_SWIFT
398399
// FIXME: This layering violation works around a limitation in
399400
// LLVM that prevents swiftc from emitting both DW_AT_name and
400401
// DW_AT_linkage_name on forward declarations and typedefs.
@@ -409,7 +410,7 @@ static void GetDeclContextImpl(DWARFDIE die,
409410
if (!base_name.empty())
410411
name = base_name;
411412
}
412-
// END SWIFT
413+
#endif
413414
context.push_back({kind, ConstString(name)});
414415
};
415416
switch (die.Tag()) {

0 commit comments

Comments
 (0)