Skip to content

Commit

Permalink
fix compilation errors with latest llvm trunk (iovisor#2575)
Browse files Browse the repository at this point in the history
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 <yhs@fb.com>
  • Loading branch information
yonghong-song authored Oct 28, 2019
1 parent 9347969 commit 2dad475
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cc/bcc_debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ void SourceDebugger::dump() {
errs() << "Debug Error: cannot get register info\n";
return;
}
#if LLVM_MAJOR_VERSION >= 10
MCTargetOptions MCOptions;
std::unique_ptr<MCAsmInfo> MAI(T->createMCAsmInfo(*MRI, TripleStr, MCOptions));
#else
std::unique_ptr<MCAsmInfo> MAI(T->createMCAsmInfo(*MRI, TripleStr));
#endif
if (!MAI) {
errs() << "Debug Error: cannot get assembly info\n";
return;
Expand Down

0 comments on commit 2dad475

Please sign in to comment.