Skip to content

[llvm-debuginfo-analyzer] Add support for parsing DWARF / CodeView SourceLanguage #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions llvm/include/llvm/DebugInfo/LogicalView/Core/LVElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVELEMENT_H
#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVELEMENT_H

#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/LogicalView/Core/LVObject.h"
#include "llvm/Support/Casting.h"
#include <map>
#include <set>
#include <variant>
#include <vector>

namespace llvm {
Expand Down Expand Up @@ -64,6 +67,22 @@ using LVElementKindSet = std::set<LVElementKind>;
using LVElementDispatch = std::map<LVElementKind, LVElementGetFunction>;
using LVElementRequest = std::vector<LVElementGetFunction>;

/// A source language supported by any of the debug info representations.
struct LVSourceLanguage {
LVSourceLanguage() = default;
LVSourceLanguage(llvm::dwarf::SourceLanguage SL) : Language(SL) {}
LVSourceLanguage(llvm::codeview::SourceLanguage SL) : Language(SL) {}

bool isValid() const { return Language.index() != 0; }
template <typename T> T getAs() { return std::get<T>(Language); }
StringRef getName() const;

private:
std::variant<std::monostate, llvm::dwarf::SourceLanguage,
llvm::codeview::SourceLanguage>
Language;
};

class LVElement : public LVObject {
enum class Property {
IsLine, // A logical line.
Expand Down Expand Up @@ -214,6 +233,9 @@ class LVElement : public LVObject {
virtual StringRef getProducer() const { return StringRef(); }
virtual void setProducer(StringRef ProducerName) {}

virtual LVSourceLanguage getSourceLanguage() const { return {}; }
virtual void setSourceLanguage(LVSourceLanguage SL) {}

virtual bool isCompileUnit() const { return false; }
virtual bool isRoot() const { return false; }

Expand Down
6 changes: 6 additions & 0 deletions llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ class LVScopeCompileUnit final : public LVScope {
// Toolchain producer.
size_t ProducerIndex = 0;

// Source language.
LVSourceLanguage SourceLanguage{};

// Compilation directory name.
size_t CompilationDirectoryIndex = 0;

Expand Down Expand Up @@ -540,6 +543,9 @@ class LVScopeCompileUnit final : public LVScope {
ProducerIndex = getStringPool().getIndex(ProducerName);
}

LVSourceLanguage getSourceLanguage() const override { return SourceLanguage; }
void setSourceLanguage(LVSourceLanguage SL) override { SourceLanguage = SL; }

void setCPUType(codeview::CPUType Type) { CompilationCPUType = Type; }
codeview::CPUType getCPUType() { return CompilationCPUType; }

Expand Down
18 changes: 18 additions & 0 deletions llvm/lib/DebugInfo/LogicalView/Core/LVElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//

#include "llvm/DebugInfo/LogicalView/Core/LVElement.h"
#include "llvm/DebugInfo/CodeView/EnumTables.h"
#include "llvm/DebugInfo/LogicalView/Core/LVReader.h"
#include "llvm/DebugInfo/LogicalView/Core/LVScope.h"
#include "llvm/DebugInfo/LogicalView/Core/LVSymbol.h"
Expand All @@ -20,6 +21,23 @@ using namespace llvm;
using namespace llvm::codeview;
using namespace llvm::logicalview;

StringRef LVSourceLanguage::getName() const {
if (!isValid())
return {};
switch (Language.index()) {
case 1: // DWARF
return llvm::dwarf::LanguageString(
std::get<llvm::dwarf::SourceLanguage>(Language));
case 2: // CodeView
{
static auto LangNames = llvm::codeview::getSourceLanguageNames();
return LangNames[std::get<llvm::codeview::SourceLanguage>(Language)].Name;
}
default:
llvm_unreachable("Unsupported language");
}
}

#define DEBUG_TYPE "Element"

LVElementDispatch LVElement::Dispatch = {
Expand Down
8 changes: 7 additions & 1 deletion llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1707,11 +1707,17 @@ void LVScopeCompileUnit::print(raw_ostream &OS, bool Full) const {

void LVScopeCompileUnit::printExtra(raw_ostream &OS, bool Full) const {
OS << formattedKind(kind()) << " '" << getName() << "'\n";
if (options().getPrintFormatting() && options().getAttributeProducer())
if (options().getPrintFormatting() && options().getAttributeProducer()) {
printAttributes(OS, Full, "{Producer} ",
const_cast<LVScopeCompileUnit *>(this), getProducer(),
/*UseQuotes=*/true,
/*PrintRef=*/false);
if (auto SL = getSourceLanguage(); SL.isValid())
printAttributes(OS, Full, "{Language} ",
const_cast<LVScopeCompileUnit *>(this), SL.getName(),
/*UseQuotes=*/true,
/*PrintRef=*/false);
}

// Reset file index, to allow its children to print the correct filename.
options().resetFilenameIndex();
Expand Down
10 changes: 8 additions & 2 deletions llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,8 +960,11 @@ Error LVSymbolVisitor::visitKnownRecord(CVSymbol &Record,
// The name of the CU, was extracted from the 'BuildInfo' subsection.
Reader->setCompileUnitCPUType(Compile2.Machine);
Scope->setName(CurrentObjectName);
if (options().getAttributeProducer())
if (options().getAttributeProducer()) {
Scope->setProducer(Compile2.Version);
Scope->setSourceLanguage(LVSourceLanguage{
static_cast<llvm::codeview::SourceLanguage>(Compile2.getLanguage())});
}
getReader().isSystemEntry(Scope, CurrentObjectName);

// The line records in CodeView are recorded per Module ID. Update
Expand Down Expand Up @@ -1005,8 +1008,11 @@ Error LVSymbolVisitor::visitKnownRecord(CVSymbol &Record,
// The name of the CU, was extracted from the 'BuildInfo' subsection.
Reader->setCompileUnitCPUType(Compile3.Machine);
Scope->setName(CurrentObjectName);
if (options().getAttributeProducer())
if (options().getAttributeProducer()) {
Scope->setProducer(Compile3.Version);
Scope->setSourceLanguage(LVSourceLanguage{
static_cast<llvm::codeview::SourceLanguage>(Compile3.getLanguage())});
}
getReader().isSystemEntry(Scope, CurrentObjectName);

// The line records in CodeView are recorded per Module ID. Update
Expand Down
5 changes: 5 additions & 0 deletions llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
if (options().getAttributeProducer())
CurrentElement->setProducer(dwarf::toStringRef(FormValue));
break;
case dwarf::DW_AT_language:
if (options().getAttributeProducer())
CurrentElement->setSourceLanguage(LVSourceLanguage{
static_cast<llvm::dwarf::SourceLanguage>(GetAsUnsignedConstant())});
break;
case dwarf::DW_AT_upper_bound:
CurrentElement->setUpperBound(GetBoundValue(FormValue));
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'hello-world.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'Cpp'
; ONE-NEXT: [002] {Function} extern not_inlined 'main' -> 'int'
; ONE-NEXT: [003] 4 {Line}
; ONE-NEXT: [003] {Code} 'subq $0x28, %rsp'
Expand All @@ -43,6 +44,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'hello-world.cpp'
; ONE-NEXT: [002] {Producer} 'Microsoft (R) Optimizing Compiler'
; ONE-NEXT: [002] {Language} 'Cpp'
; ONE-NEXT: [002] {Function} extern not_inlined 'main' -> 'int'
; ONE-NEXT: [003] 4 {Line}
; ONE-NEXT: [003] {Code} 'subq $0x28, %rsp'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-44884.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'Cpp'
; ONE-NEXT: [002] {Function} extern not_inlined 'bar' -> 'int'
; ONE-NEXT: [003] {Parameter} 'Input' -> 'float'
; ONE-NEXT: [003] 1 {Line}
Expand All @@ -63,6 +64,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-44884.cpp'
; ONE-NEXT: [002] {Producer} 'Microsoft (R) Optimizing Compiler'
; ONE-NEXT: [002] {Language} 'Cpp'
; ONE-NEXT: [002] {Function} extern not_inlined 'bar' -> 'int'
; ONE-NEXT: [003] {Variable} 'Input' -> 'float'
; ONE-NEXT: [003] 1 {Line}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-46466.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'Cpp'
; ONE-NEXT: [002] {Variable} extern 'S' -> 'Struct'
; ONE-NEXT: [002] 1 {Struct} 'Struct'
; ONE-NEXT: [003] {Member} public 'U' -> 'Union'
Expand All @@ -50,6 +51,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-46466.cpp'
; ONE-NEXT: [002] {Producer} 'Microsoft (R) Optimizing Compiler'
; ONE-NEXT: [002] {Language} 'Cpp'
; ONE-NEXT: [002] {Variable} extern 'S' -> 'Struct'
; ONE-NEXT: [002] 1 {Struct} 'Struct'
; ONE-NEXT: [003] {Member} public 'U' -> 'Union'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-43860.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'Cpp'
; ONE-NEXT: [002] 2 {Function} inlined 'InlineFunction' -> 'int'
; ONE-NEXT: [003] {Parameter} '' -> 'int'
; ONE-NEXT: [002] {Function} extern not_inlined 'test' -> 'int'
Expand All @@ -59,6 +60,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-43860.cpp'
; ONE-NEXT: [002] {Producer} 'Microsoft (R) Optimizing Compiler'
; ONE-NEXT: [002] {Language} 'Cpp'
; ONE-NEXT: [002] {Function} extern declared_inlined 'InlineFunction' -> 'int'
; ONE-NEXT: [003] {Block}
; ONE-NEXT: [004] {Variable} 'Var_2' -> 'int'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
; ONE-EMPTY:
; ONE-NEXT: [0x0000000000][001] {CompileUnit} 'test.cpp'
; ONE-NEXT: [0x0000000000][002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [0x0000000000][002] {Language} 'Cpp'
; ONE-NEXT: {Directory} 'test.cpp'
; ONE-NEXT: {Directory} 'x:/tests/input'
; ONE-NEXT: {File} 'general'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'hello-world.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 3 {Function} extern not_inlined 'main' -> 'int'
; ONE-NEXT: [003] 4 {Line}
; ONE-NEXT: [003] {Code} 'pushq %rbp'
Expand All @@ -48,6 +49,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'hello-world.cpp'
; ONE-NEXT: [002] {Producer} 'GNU C++14 10.3.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus'
; ONE-NEXT: [002] 3 {Function} extern not_inlined 'main' -> 'int'
; ONE-NEXT: [003] 4 {Line}
; ONE-NEXT: [003] {Code} 'endbr64'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-44884.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 1 {Function} extern not_inlined 'bar' -> 'int'
; ONE-NEXT: [003] 1 {Parameter} 'Input' -> 'float'
; ONE-NEXT: [003] 1 {Line}
Expand Down Expand Up @@ -76,6 +77,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-44884.cpp'
; ONE-NEXT: [002] {Producer} 'GNU C++14 10.3.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus'
; ONE-NEXT: [002] 1 {Function} extern not_inlined 'bar' -> 'int'
; ONE-NEXT: [003] 1 {Parameter} 'Input' -> 'float'
; ONE-NEXT: [003] 1 {Line}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-46466.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 8 {Variable} extern 'S' -> 'Struct'
; ONE-NEXT: [002] 1 {Struct} 'Struct'
; ONE-NEXT: [003] 5 {Member} public 'U' -> 'Union'
Expand All @@ -46,6 +47,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-46466.cpp'
; ONE-NEXT: [002] {Producer} 'GNU C++14 10.3.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus'
; ONE-NEXT: [002] 8 {Variable} extern 'S' -> 'Struct'
; ONE-NEXT: [002] 1 {Struct} 'Struct'
; ONE-NEXT: [003] 5 {Member} public 'U' -> 'Union'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-43860.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 2 {Function} extern not_inlined 'InlineFunction' -> 'int'
; ONE-NEXT: [003] {Block}
; ONE-NEXT: [004] 5 {Variable} 'Var_2' -> 'int'
Expand All @@ -63,6 +64,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-43860.cpp'
; ONE-NEXT: [002] {Producer} 'GNU C++14 10.3.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus'
; ONE-NEXT: [002] 2 {Function} extern declared_inlined 'InlineFunction' -> 'int'
; ONE-NEXT: [003] {Block}
; ONE-NEXT: [004] 5 {Variable} 'Var_2' -> 'int'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
; ONE-EMPTY:
; ONE-NEXT: [0x000000000b][001] {CompileUnit} 'test.cpp'
; ONE-NEXT: [0x000000000b][002] {Producer} 'clang version 15.0.0 {{.*}}'
; ONE-NEXT: [0x000000000b][002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: {Directory} '/data/projects/tests/input/general'
; ONE-NEXT: {File} 'test.cpp'
; ONE-NEXT: {Public} 'foo' [0x0000000000:0x000000003a]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'test.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 14.0.6'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 1 {TypeAlias} 'INTPTR' -> '* const int'
; ONE-NEXT: [002] 2 {Function} extern not_inlined 'foo' -> 'int'
; ONE-NEXT: [003] {Block}
Expand All @@ -57,6 +58,7 @@
; TWO-EMPTY:
; TWO-NEXT: [001] {CompileUnit} 'test.cpp'
; TWO-NEXT: [002] {Producer} 'GNU C++17 11.3.0 {{.*}}'
; TWO-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; TWO-NEXT: [002] 1 {TypeAlias} 'INTPTR' -> '* const int'
; TWO-NEXT: [002] 2 {Function} extern not_inlined 'foo' -> 'int'
; TWO-NEXT: [003] {Block}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'test.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 14.0.6'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 1 {TypeAlias} 'INTPTR' -> '* const int'
; ONE-NEXT: [002] 2 {Function} extern not_inlined 'foo' -> 'int'
; ONE-NEXT: [003] {Block}
Expand Down Expand Up @@ -106,6 +107,7 @@
; THR-EMPTY:
; THR-NEXT: [001] {CompileUnit} 'test.cpp'
; THR-NEXT: [002] {Producer} 'GNU C++17 11.3.0 {{.*}}'
; THR-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; THR-NEXT: [002] 1 {TypeAlias} 'INTPTR' -> '* const int'
; THR-NEXT: [002] 2 {Function} extern not_inlined 'foo' -> 'int'
; THR-NEXT: [003] {Block}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'hello-world.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 19{{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 3 {Function} extern not_inlined 'main' -> 'int'
; ONE-NEXT: [003] 4 {Line}
; ONE-NEXT: [003] {Code} 'nop'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-44884.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 19{{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 1 {Function} extern not_inlined 'bar' -> 'int'
; ONE-NEXT: [003] 1 {Parameter} 'Input' -> 'float'
; ONE-NEXT: [003] 1 {Line}
Expand Down Expand Up @@ -84,6 +85,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-44884.cpp'
; ONE-NEXT: [002] {Producer} 'GNU C++14 10.3.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus'
; ONE-NEXT: [002] 1 {Function} extern not_inlined 'bar' -> 'int'
; ONE-NEXT: [003] 1 {Parameter} 'Input' -> 'float'
; ONE-NEXT: [003] 1 {Line}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-46466.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 19{{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 8 {Variable} extern 'S' -> 'Struct'
; ONE-NEXT: [002] 1 {Struct} 'Struct'
; ONE-NEXT: [003] 5 {Member} public 'U' -> 'Union'
Expand All @@ -49,6 +50,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-46466.cpp'
; ONE-NEXT: [002] {Producer} 'GNU C++14 10.3.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus'
; ONE-NEXT: [002] 8 {Variable} extern 'S' -> 'Struct'
; ONE-NEXT: [002] 1 {Struct} 'Struct'
; ONE-NEXT: [003] 5 {Member} public 'U' -> 'Union'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-43860.cpp'
; ONE-NEXT: [002] {Producer} 'clang version 19{{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: [002] 2 {Function} extern inlined 'InlineFunction' -> 'int'
; ONE-NEXT: [003] {Block}
; ONE-NEXT: [004] 5 {Variable} 'Var_2' -> 'int'
Expand All @@ -66,6 +67,7 @@
; ONE-EMPTY:
; ONE-NEXT: [001] {CompileUnit} 'pr-43860.cpp'
; ONE-NEXT: [002] {Producer} 'GNU C++14 10.3.0 {{.*}}'
; ONE-NEXT: [002] {Language} 'DW_LANG_C_plus_plus'
; ONE-NEXT: [002] 2 {Function} extern declared_inlined 'InlineFunction' -> 'int'
; ONE-NEXT: [003] {Block}
; ONE-NEXT: [004] 5 {Variable} 'Var_2' -> 'int'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
; ONE-EMPTY:
; ONE-NEXT: [0x000000000b][001] {CompileUnit} 'test.cpp'
; ONE-NEXT: [0x000000000b][002] {Producer} 'clang version 19{{.*}}'
; ONE-NEXT: [0x000000000b][002] {Language} 'DW_LANG_C_plus_plus_14'
; ONE-NEXT: {Directory} '{{.*}}/general'
; ONE-NEXT: {File} 'test.cpp'
; ONE-NEXT: {Public} 'foo' [0x0000000002:0x000000007f]
Expand Down
Loading