WebAssembly: assert that there aren't any constant pools

WebAssembly will either use globals or immediates, since it's a virtual ISA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245989 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
JF Bastien 2015-08-25 23:19:49 +00:00
parent 3abc9b6333
commit c3a33b1b54

View File

@ -23,6 +23,7 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfo.h"
@ -67,6 +68,7 @@ private:
// AsmPrinter Implementation.
//===------------------------------------------------------------------===//
void EmitConstantPool() override;
void EmitFunctionEntryLabel() override;
void EmitFunctionBodyStart() override;
void EmitFunctionBodyEnd() override;
@ -108,6 +110,11 @@ static const char *toType(const Type *Ty) {
return "<invalid>";
}
void WebAssemblyAsmPrinter::EmitConstantPool() {
assert(MF->getConstantPool()->getConstants().empty() &&
"WebAssembly disables constant pools");
}
void WebAssemblyAsmPrinter::EmitFunctionEntryLabel() {
SmallString<128> Str;
raw_svector_ostream OS(Str);