summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-01-16 23:16:12 +0000
committerPhilip Reames <listmail@philipreames.com>2015-01-16 23:16:12 +0000
commit36319538d0981498c9eb6ba14066049d653298a5 (patch)
treecb20cd8a5b66faeafbb545b6cefa2ccd46e641ae /llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp
parent6bfd398022a03301f2c86d38143706a0423e7258 (diff)
downloadbcm5719-llvm-36319538d0981498c9eb6ba14066049d653298a5.tar.gz
bcm5719-llvm-36319538d0981498c9eb6ba14066049d653298a5.zip
clang-format all the GC related files (NFC)
Nothing interesting here... llvm-svn: 226342
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp
index e293acd43a8..aa4418f6a75 100644
--- a/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp
@@ -34,18 +34,16 @@ using namespace llvm;
namespace {
- class ErlangGCPrinter : public GCMetadataPrinter {
- public:
- void finishAssembly(Module &M, GCModuleInfo &Info,
- AsmPrinter &AP) override;
- };
-
+class ErlangGCPrinter : public GCMetadataPrinter {
+public:
+ void finishAssembly(Module &M, GCModuleInfo &Info, AsmPrinter &AP) override;
+};
}
static GCMetadataPrinterRegistry::Add<ErlangGCPrinter>
-X("erlang", "erlang-compatible garbage collector");
+ X("erlang", "erlang-compatible garbage collector");
-void llvm::linkErlangGCPrinter() { }
+void llvm::linkErlangGCPrinter() {}
void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info,
AsmPrinter &AP) {
@@ -54,13 +52,13 @@ void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info,
AP.TM.getSubtargetImpl()->getDataLayout()->getPointerSize();
// Put this in a custom .note section.
- AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getContext()
- .getELFSection(".note.gc", ELF::SHT_PROGBITS, 0,
- SectionKind::getDataRel()));
+ AP.OutStreamer.SwitchSection(
+ AP.getObjFileLowering().getContext().getELFSection(
+ ".note.gc", ELF::SHT_PROGBITS, 0, SectionKind::getDataRel()));
// For each function...
for (GCModuleInfo::FuncInfoVec::iterator FI = Info.funcinfo_begin(),
- IE = Info.funcinfo_end();
+ IE = Info.funcinfo_end();
FI != IE; ++FI) {
GCFunctionInfo &MD = **FI;
if (MD.getStrategy().getName() != getStrategy().getName())
@@ -91,7 +89,7 @@ void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info,
// Emit the address of the safe point.
OS.AddComment("safe point address");
MCSymbol *Label = PI->Label;
- AP.EmitLabelPlusOffset(Label/*Hi*/, 0/*Offset*/, 4/*Size*/);
+ AP.EmitLabelPlusOffset(Label /*Hi*/, 0 /*Offset*/, 4 /*Size*/);
}
// Stack information never change in safe points! Only print info from the
@@ -104,8 +102,9 @@ void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info,
// Emit stack arity, i.e. the number of stacked arguments.
unsigned RegisteredArgs = IntPtrSize == 4 ? 5 : 6;
- unsigned StackArity = MD.getFunction().arg_size() > RegisteredArgs ?
- MD.getFunction().arg_size() - RegisteredArgs : 0;
+ unsigned StackArity = MD.getFunction().arg_size() > RegisteredArgs
+ ? MD.getFunction().arg_size() - RegisteredArgs
+ : 0;
OS.AddComment("stack arity");
AP.EmitInt16(StackArity);
@@ -116,7 +115,7 @@ void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info,
// And for each live root...
for (GCFunctionInfo::live_iterator LI = MD.live_begin(PI),
LE = MD.live_end(PI);
- LI != LE; ++LI) {
+ LI != LE; ++LI) {
// Emit live root's offset within the stack frame.
OS.AddComment("stack index (offset / wordsize)");
AP.EmitInt16(LI->StackOffset / IntPtrSize);
OpenPOWER on IntegriCloud