Skip to content

[JITLink][NFC] Guard functions used only for debug for XCOFFLinkGraphBuilder #134413

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
merged 1 commit into from
Apr 7, 2025
Merged
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
4 changes: 4 additions & 0 deletions llvm/lib/ExecutionEngine/JITLink/XCOFFLinkGraphBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ XCOFFLinkGraphBuilder::XCOFFLinkGraphBuilder(
std::string(Obj.getFileName()), std::move(SSP), std::move(TT),
std::move(Features), std::move(GetEdgeKindName))) {}

#ifndef NDEBUG
static llvm::StringRef getStorageClassString(XCOFF::StorageClass SC) {
switch (SC) {
case XCOFF::StorageClass::C_FILE:
Expand Down Expand Up @@ -144,6 +145,7 @@ static llvm::StringRef getStorageClassString(XCOFF::StorageClass SC) {
return "C_TCSYM (Reserved)";
}
}
#endif

Error XCOFFLinkGraphBuilder::processSections() {
LLVM_DEBUG(dbgs() << " Creating graph sections...\n");
Expand Down Expand Up @@ -203,6 +205,7 @@ getXCOFFSymbolContainingSymbolRef(const object::XCOFFObjectFile &Obj,
return object::XCOFFSymbolRef(DRI, &Obj);
}

#ifndef NDEBUG
static void printSymbolEntry(raw_ostream &OS,
const object::XCOFFObjectFile &Obj,
const object::XCOFFSymbolRef &Sym) {
Expand Down Expand Up @@ -231,6 +234,7 @@ static void printSymbolEntry(raw_ostream &OS,
}
OS << "\n";
}
#endif

Error XCOFFLinkGraphBuilder::processCsectsAndSymbols() {
LLVM_DEBUG(dbgs() << " Creating graph blocks and symbols...\n");
Expand Down