diff options
Diffstat (limited to 'lib/CodeGen/BooleanHandler.cc')
| -rw-r--r-- | lib/CodeGen/BooleanHandler.cc | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/CodeGen/BooleanHandler.cc b/lib/CodeGen/BooleanHandler.cc deleted file mode 100644 index 558ac95..0000000 --- a/lib/CodeGen/BooleanHandler.cc +++ /dev/null @@ -1,16 +0,0 @@ -#include "cps/BooleanHandler.h" - -using namespace llvm; -using namespace cps; - -void BooleanHandler::emitDeclare(const std::string &Name) { - Function *TheFunction = Builder.GetInsertBlock()->getParent(); - IRBuilder<> TmpB(&TheFunction->getEntryBlock(), TheFunction->getEntryBlock().begin()); - AllocaInst *Alloca = TmpB.CreateAlloca(Type::getInt1Ty(Context), nullptr, Name); - Builder.CreateStore(ConstantInt::get(Context, APInt(1, 0)), Alloca); - NamedValues[Name] = Alloca; -} - -Value *BooleanHandler::createLiteral(bool Val) { - return ConstantInt::get(Context, APInt(1, Val ? 1 : 0)); -} |
