Skip to content

Commit 9b6e6a0

Browse files
committed
Redo format.
1 parent 9deb7bf commit 9b6e6a0

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

llvm/include/llvm/CodeGen/MachineModuleInfo.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class MachineModuleInfoImpl {
6666
protected:
6767
/// Return the entries from a DenseMap in a deterministic sorted orer.
6868
/// Clears the map.
69-
static SymbolListTy getSortedStubs(DenseMap<MCSymbol *, StubValueTy> &);
69+
static SymbolListTy getSortedStubs(DenseMap<MCSymbol*, StubValueTy>&);
7070

7171
/// Return the entries from a DenseMap in a deterministic sorted orer.
7272
/// Clears the map.
@@ -100,7 +100,7 @@ class MachineModuleInfo {
100100
MachineModuleInfoImpl *ObjFileMMI;
101101

102102
/// Maps IR Functions to their corresponding MachineFunctions.
103-
DenseMap<const Function *, std::unique_ptr<MachineFunction>> MachineFunctions;
103+
DenseMap<const Function*, std::unique_ptr<MachineFunction>> MachineFunctions;
104104
/// Next unique number available for a MachineFunction.
105105
unsigned NextFnNum = 0;
106106
const Function *LastRequest = nullptr; ///< Used for shortcut/cache.
@@ -153,14 +153,16 @@ class MachineModuleInfo {
153153

154154
/// Keep track of various per-module pieces of information for backends
155155
/// that would like to do so.
156-
template <typename Ty> Ty &getObjFileInfo() {
156+
template<typename Ty>
157+
Ty &getObjFileInfo() {
157158
if (ObjFileMMI == nullptr)
158159
ObjFileMMI = new Ty(*this);
159-
return *static_cast<Ty *>(ObjFileMMI);
160+
return *static_cast<Ty*>(ObjFileMMI);
160161
}
161162

162-
template <typename Ty> const Ty &getObjFileInfo() const {
163-
return const_cast<MachineModuleInfo *>(this)->getObjFileInfo<Ty>();
163+
template<typename Ty>
164+
const Ty &getObjFileInfo() const {
165+
return const_cast<MachineModuleInfo*>(this)->getObjFileInfo<Ty>();
164166
}
165167

166168
/// \}

llvm/lib/CodeGen/MachineModuleInfo.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ class FreeMachineFunction : public FunctionPass {
137137
return true;
138138
}
139139

140-
StringRef getPassName() const override { return "Free MachineFunction"; }
140+
StringRef getPassName() const override {
141+
return "Free MachineFunction";
142+
}
141143
};
142144

143145
} // end anonymous namespace
@@ -156,7 +158,7 @@ MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(
156158

157159
MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(
158160
const LLVMTargetMachine *TM, MCContext *ExtContext)
159-
: ImmutablePass(ID), MMI(TM) {
161+
: ImmutablePass(ID), MMI(TM, ExtContext) {
160162
initializeMachineModuleInfoWrapperPassPass(*PassRegistry::getPassRegistry());
161163
}
162164

0 commit comments

Comments
 (0)