]> granicus.if.org Git - llvm/commitdiff
Rename Win64Exception.(cpp|h) to WinException.(cpp|h)
authorReid Kleckner <reid@kleckner.net>
Thu, 28 May 2015 22:47:01 +0000 (22:47 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 28 May 2015 22:47:01 +0000 (22:47 +0000)
This is in preparation for reusing this for 32-bit x86 EH table
emission.  Also updates the type name for consistency. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238521 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/CMakeLists.txt
lib/CodeGen/AsmPrinter/WinException.cpp [moved from lib/CodeGen/AsmPrinter/Win64Exception.cpp with 96% similarity]
lib/CodeGen/AsmPrinter/WinException.h [moved from lib/CodeGen/AsmPrinter/Win64Exception.h with 89% similarity]

index 206be702e7249626a2e246219600f84b5150eabf..c895aa5fdbf0a9553dd58391fbfbccbbe0d86e75 100644 (file)
@@ -14,7 +14,7 @@
 #include "llvm/CodeGen/AsmPrinter.h"
 #include "DwarfDebug.h"
 #include "DwarfException.h"
-#include "Win64Exception.h"
+#include "WinException.h"
 #include "WinCodeViewLineTables.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/Statistic.h"
@@ -269,7 +269,7 @@ bool AsmPrinter::doInitialization(Module &M) {
     case WinEH::EncodingType::Invalid:
       break;
     case WinEH::EncodingType::Itanium:
-      ES = new Win64Exception(this);
+      ES = new WinException(this);
       break;
     }
     break;
index 01d2c7220ab94aacd35af63c1e4874606a5b1d9c..f2da8557a5226594a2549df227ac957b8e1db9d3 100644 (file)
@@ -18,7 +18,7 @@ add_llvm_library(LLVMAsmPrinter
   EHStreamer.cpp
   ErlangGCPrinter.cpp
   OcamlGCPrinter.cpp
-  Win64Exception.cpp
+  WinException.cpp
   WinCodeViewLineTables.cpp
   )
 
similarity index 96%
rename from lib/CodeGen/AsmPrinter/Win64Exception.cpp
rename to lib/CodeGen/AsmPrinter/WinException.cpp
index dc6df9cb0144a3d114cf79e2bdc7572c2d2eaeac..9c6069b41ddb8e025c9d2d795a14cfe0ffa172ca 100644 (file)
@@ -1,4 +1,4 @@
-//===-- CodeGen/AsmPrinter/Win64Exception.cpp - Dwarf Exception Impl ------===//
+//===-- CodeGen/AsmPrinter/WinException.cpp - Dwarf Exception Impl ------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Win64Exception.h"
+#include "WinException.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/Target/TargetRegisterInfo.h"
 using namespace llvm;
 
-Win64Exception::Win64Exception(AsmPrinter *A)
+WinException::WinException(AsmPrinter *A)
   : EHStreamer(A), shouldEmitPersonality(false), shouldEmitLSDA(false),
     shouldEmitMoves(false) {}
 
-Win64Exception::~Win64Exception() {}
+WinException::~WinException() {}
 
 /// endModule - Emit all exception information that should come after the
 /// content.
-void Win64Exception::endModule() {
+void WinException::endModule() {
 }
 
-void Win64Exception::beginFunction(const MachineFunction *MF) {
+void WinException::beginFunction(const MachineFunction *MF) {
   shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA = false;
 
   // If any landing pads survive, we need an EH table.
@@ -104,7 +104,7 @@ void Win64Exception::beginFunction(const MachineFunction *MF) {
 
 /// endFunction - Gather and emit post-function exception information.
 ///
-void Win64Exception::endFunction(const MachineFunction *MF) {
+void WinException::endFunction(const MachineFunction *MF) {
   if (!shouldEmitPersonality && !shouldEmitMoves)
     return;
 
@@ -136,14 +136,14 @@ void Win64Exception::endFunction(const MachineFunction *MF) {
   Asm->OutStreamer->EmitWinCFIEndProc();
 }
 
-const MCExpr *Win64Exception::createImageRel32(const MCSymbol *Value) {
+const MCExpr *WinException::createImageRel32(const MCSymbol *Value) {
   if (!Value)
     return MCConstantExpr::Create(0, Asm->OutContext);
   return MCSymbolRefExpr::Create(Value, MCSymbolRefExpr::VK_COFF_IMGREL32,
                                  Asm->OutContext);
 }
 
-const MCExpr *Win64Exception::createImageRel32(const GlobalValue *GV) {
+const MCExpr *WinException::createImageRel32(const GlobalValue *GV) {
   if (!GV)
     return MCConstantExpr::Create(0, Asm->OutContext);
   return createImageRel32(Asm->getSymbol(GV));
@@ -177,7 +177,7 @@ const MCExpr *Win64Exception::createImageRel32(const GlobalValue *GV) {
 ///       imagerel32 LabelLPad;        // Zero means __finally.
 ///     } Entries[NumEntries];
 ///   };
-void Win64Exception::emitCSpecificHandlerTable() {
+void WinException::emitCSpecificHandlerTable() {
   const std::vector<LandingPadInfo> &PadInfos = MMI->getLandingPads();
 
   // Simplifying assumptions for first implementation:
@@ -264,7 +264,7 @@ void Win64Exception::emitCSpecificHandlerTable() {
   }
 }
 
-void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
+void WinException::emitCXXFrameHandler3Table(const MachineFunction *MF) {
   const Function *F = MF->getFunction();
   const Function *ParentF = MMI->getWinEHParent(F);
   auto &OS = *Asm->OutStreamer;
similarity index 89%
rename from lib/CodeGen/AsmPrinter/Win64Exception.h
rename to lib/CodeGen/AsmPrinter/WinException.h
index 5f4237fc0152467e3b7a6076f5587a6f045aa656..ee5f122a49d2a51fef96f2308060ae8bae5ed325 100644 (file)
@@ -1,4 +1,4 @@
-//===-- Win64Exception.h - Windows Exception Handling ----------*- C++ -*--===//
+//===-- WinException.h - Windows Exception Handling ----------*- C++ -*--===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -21,7 +21,7 @@ class GlobalValue;
 class MachineFunction;
 class MCExpr;
 
-class Win64Exception : public EHStreamer {
+class WinException : public EHStreamer {
   /// Per-function flag to indicate if personality info should be emitted.
   bool shouldEmitPersonality;
 
@@ -42,8 +42,8 @@ public:
   //===--------------------------------------------------------------------===//
   // Main entry points.
   //
-  Win64Exception(AsmPrinter *A);
-  ~Win64Exception() override;
+  WinException(AsmPrinter *A);
+  ~WinException() override;
 
   /// Emit all exception information that should come after the content.
   void endModule() override;