ArrayRefize some code. No functionality change.
[oota-llvm.git] / lib / Target / NVPTX / NVPTXAsmPrinter.h
index a0352994506aabef572c7348e333b7818c5fd4a1..42498f0bf7c5ee876337aea7020c830cc3fd7542 100644 (file)
 #define NVPTXASMPRINTER_H
 
 #include "NVPTX.h"
-#include "NVPTXTargetMachine.h"
 #include "NVPTXSubtarget.h"
-#include "llvm/Function.h"
+#include "NVPTXTargetMachine.h"
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/CodeGen/AsmPrinter.h"
-#include "llvm/Support/CommandLine.h"
+#include "llvm/IR/Function.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCExpr.h"
-#include "llvm/Target/TargetMachine.h"
 #include "llvm/MC/MCSymbol.h"
+#include "llvm/Support/CommandLine.h"
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Target/Mangler.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringExtras.h"
+#include "llvm/Target/TargetMachine.h"
 #include <fstream>
 
 // The ptx syntax and format is very different from that usually seem in a .s
@@ -148,8 +148,7 @@ class LLVM_LIBRARY_VISIBILITY NVPTXAsmPrinter : public AsmPrinter {
             O << ", ";
           O << (unsigned int)buffer[i];
         }
-      }
-      else {
+      } else {
         // print out in 4-bytes or 8-bytes
         unsigned int pos = 0;
         unsigned int nSym = 0;
@@ -169,16 +168,14 @@ class LLVM_LIBRARY_VISIBILITY NVPTXAsmPrinter : public AsmPrinter {
             else if (ConstantExpr *Cexpr =
                 dyn_cast<ConstantExpr>(v)) {
               O << *nvptx::LowerConstant(Cexpr, AP);
-            }
-            else
-              assert(0 && "symbol type unknown");
+            } else
+              llvm_unreachable("symbol type unknown");
             nSym++;
             if (nSym >= numSymbols)
               nextSymbolPos = size+1;
             else
               nextSymbolPos = symbolPosInBuffer[nSym];
-          }
-          else
+          } else
             if (nBytes == 4)
               O << *(unsigned int*)(buffer+pos);
             else