Skip to content

Commit 2dad475

Browse files
fix compilation errors with latest llvm trunk (iovisor#2575)
llvm commit https://reviews.llvm.org/D66795 changed the signature of function createMCAsmInfo(). - MCAsmInfo *createMCAsmInfo(const MCRegisterInfo &MRI, - StringRef TheTriple) const { + MCAsmInfo *createMCAsmInfo(const MCRegisterInfo &MRI, StringRef TheTriple, + const MCTargetOptions &Options) const { Did similar adjustment in bcc to ensure compilation success. Signed-off-by: Yonghong Song <[email protected]>
1 parent 9347969 commit 2dad475

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cc/bcc_debug.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ void SourceDebugger::dump() {
117117
errs() << "Debug Error: cannot get register info\n";
118118
return;
119119
}
120+
#if LLVM_MAJOR_VERSION >= 10
121+
MCTargetOptions MCOptions;
122+
std::unique_ptr<MCAsmInfo> MAI(T->createMCAsmInfo(*MRI, TripleStr, MCOptions));
123+
#else
120124
std::unique_ptr<MCAsmInfo> MAI(T->createMCAsmInfo(*MRI, TripleStr));
125+
#endif
121126
if (!MAI) {
122127
errs() << "Debug Error: cannot get assembly info\n";
123128
return;

0 commit comments

Comments
 (0)