Skip to content

Commit b33ef5b

Browse files
authored
[BOLT][DWARF][NFC] Add mc opt to DWARFRewriter.cpp (#100800)
Running into an error with removing DWP where the assertion `RelaxAllView && "RegisterMCTargetOptionsFlags not created."'` failed. This is a result of DWP bringing the mc::RegisterMCTargetOptionsFlags option in, and the option being removed with DWP. The need for this option didn't originally exist because we didn't use MC in DWARFRewriter, but we switched to using DWARFStreamer which needed the option. https://reviews.llvm.org/D75579 https://reviews.llvm.org/D106417
1 parent 069e8bc commit b33ef5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bolt/lib/Rewrite/DWARFRewriter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "llvm/MC/MCAssembler.h"
3333
#include "llvm/MC/MCObjectWriter.h"
3434
#include "llvm/MC/MCStreamer.h"
35+
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
3536
#include "llvm/Object/ObjectFile.h"
3637
#include "llvm/Support/Casting.h"
3738
#include "llvm/Support/CommandLine.h"
@@ -56,6 +57,8 @@
5657
#undef DEBUG_TYPE
5758
#define DEBUG_TYPE "bolt"
5859

60+
static mc::RegisterMCTargetOptionsFlags MOF;
61+
5962
static void printDie(const DWARFDie &DIE) {
6063
DIDumpOptions DumpOpts;
6164
DumpOpts.ShowForm = true;

0 commit comments

Comments
 (0)