Use Assert() rather than assert()
This commit is contained in:
2
ast.cpp
2
ast.cpp
@@ -155,7 +155,7 @@ WalkAST(ASTNode *node, ASTPreCallBackFunc preFunc, ASTPostCallBackFunc postFunc,
|
|||||||
else {
|
else {
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// Handle expressions
|
// Handle expressions
|
||||||
assert(dynamic_cast<Expr *>(node) != NULL);
|
Assert(dynamic_cast<Expr *>(node) != NULL);
|
||||||
UnaryExpr *ue;
|
UnaryExpr *ue;
|
||||||
BinaryExpr *be;
|
BinaryExpr *be;
|
||||||
AssignExpr *ae;
|
AssignExpr *ae;
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ InitLLVMUtil(llvm::LLVMContext *ctx, Target target) {
|
|||||||
LLVMTypes::MaskType = LLVMTypes::BoolVectorType =
|
LLVMTypes::MaskType = LLVMTypes::BoolVectorType =
|
||||||
llvm::VectorType::get(llvm::Type::getInt1Ty(*ctx), target.vectorWidth);
|
llvm::VectorType::get(llvm::Type::getInt1Ty(*ctx), target.vectorWidth);
|
||||||
else {
|
else {
|
||||||
assert(target.maskBitCount == 32);
|
Assert(target.maskBitCount == 32);
|
||||||
LLVMTypes::MaskType = LLVMTypes::BoolVectorType =
|
LLVMTypes::MaskType = LLVMTypes::BoolVectorType =
|
||||||
llvm::VectorType::get(llvm::Type::getInt32Ty(*ctx), target.vectorWidth);
|
llvm::VectorType::get(llvm::Type::getInt32Ty(*ctx), target.vectorWidth);
|
||||||
}
|
}
|
||||||
|
|||||||
4
opt.cpp
4
opt.cpp
@@ -550,7 +550,7 @@ lGetMask(llvm::Value *factor) {
|
|||||||
/* FIXME: This will break if we ever do 32-wide compilation, in which case
|
/* FIXME: This will break if we ever do 32-wide compilation, in which case
|
||||||
it don't be possible to distinguish between -1 for "don't know" and
|
it don't be possible to distinguish between -1 for "don't know" and
|
||||||
"known and all bits on". */
|
"known and all bits on". */
|
||||||
assert(g->target.vectorWidth < 32);
|
Assert(g->target.vectorWidth < 32);
|
||||||
|
|
||||||
llvm::ConstantVector *cv = llvm::dyn_cast<llvm::ConstantVector>(factor);
|
llvm::ConstantVector *cv = llvm::dyn_cast<llvm::ConstantVector>(factor);
|
||||||
if (cv) {
|
if (cv) {
|
||||||
@@ -2266,7 +2266,7 @@ GSImprovementsPass::runOnBasicBlock(llvm::BasicBlock &bb) {
|
|||||||
|
|
||||||
llvm::ConstantInt *offsetScaleInt =
|
llvm::ConstantInt *offsetScaleInt =
|
||||||
llvm::dyn_cast<llvm::ConstantInt>(offsetScale);
|
llvm::dyn_cast<llvm::ConstantInt>(offsetScale);
|
||||||
assert(offsetScaleInt != NULL);
|
Assert(offsetScaleInt != NULL);
|
||||||
|
|
||||||
if (offsets->getType() == LLVMTypes::Int64VectorType)
|
if (offsets->getType() == LLVMTypes::Int64VectorType)
|
||||||
// offsetScale is an i32, so sext it so that if we use it in a
|
// offsetScale is an i32, so sext it so that if we use it in a
|
||||||
|
|||||||
2
stmt.cpp
2
stmt.cpp
@@ -1989,7 +1989,7 @@ LabeledStmt::LabeledStmt(const char *n, Stmt *s, SourcePos p)
|
|||||||
void
|
void
|
||||||
LabeledStmt::EmitCode(FunctionEmitContext *ctx) const {
|
LabeledStmt::EmitCode(FunctionEmitContext *ctx) const {
|
||||||
llvm::BasicBlock *bblock = ctx->GetLabeledBasicBlock(name);
|
llvm::BasicBlock *bblock = ctx->GetLabeledBasicBlock(name);
|
||||||
assert(bblock != NULL);
|
Assert(bblock != NULL);
|
||||||
|
|
||||||
// End the current basic block with a jump to our basic block and then
|
// End the current basic block with a jump to our basic block and then
|
||||||
// set things up for emission to continue there. Note that the current
|
// set things up for emission to continue there. Note that the current
|
||||||
|
|||||||
@@ -46,7 +46,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <assert.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#ifdef ISPC_IS_LINUX
|
#ifdef ISPC_IS_LINUX
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user