Skip to content

Commit 3e9f0f9

Browse files
augusto2112adrian-prantl
authored andcommitted
[lldb] Remove unconditional include of Swift header on generic code
DWARFDIE can be compiled without Swift support. (cherry picked from commit fdca57a)
1 parent 0a2539e commit 3e9f0f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

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

2021
#include "llvm/ADT/iterator.h"
@@ -441,8 +442,7 @@ static void GetDeclContextImpl(DWARFDIE die, bool derive_template_names,
441442

442443
// Add this DIE's contribution at the end of the chain.
443444
auto push_ctx = [&](CompilerContextKind kind, llvm::StringRef name) {
444-
// BEGIN SWIFT
445-
//
445+
#ifdef LLDB_ENABLE_SWIFT
446446
// FIXME: This layering violation works around a limitation in
447447
// LLVM that prevents swiftc from emitting both DW_AT_name and
448448
// DW_AT_linkage_name on forward declarations and typedefs.
@@ -457,7 +457,7 @@ static void GetDeclContextImpl(DWARFDIE die, bool derive_template_names,
457457
if (!base_name.empty())
458458
name = base_name;
459459
}
460-
// END SWIFT
460+
#endif
461461
context.push_back({kind, ConstString(name)});
462462
};
463463
switch (die.Tag()) {

0 commit comments

Comments
 (0)