summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-20 21:07:09 +0000
committerChris Lattner <sabre@nondot.org>2010-07-20 21:07:09 +0000
commitf2f387018903c5f0c8ec0c655392454be83f43ed (patch)
tree50bafd9ad6d2995d1362181680b87fe018ca6027 /clang/lib/CodeGen/CodeGenFunction.h
parentbb610d90535bddf87dc4d9b90c695e9c0add69d3 (diff)
downloadbcm5719-llvm-f2f387018903c5f0c8ec0c655392454be83f43ed.tar.gz
bcm5719-llvm-f2f387018903c5f0c8ec0c655392454be83f43ed.zip
Follow the implementation approach suggested by PR6687,
which generates more efficient and more obviously conformant code. We now test for overflow of the multiply then force the result to -1 if so. On X86, this generates nice code like this: __Z4testl: ## @_Z4testl ## BB#0: ## %entry subl $12, %esp movl $4, %eax mull 16(%esp) testl %edx, %edx movl $-1, %ecx cmovel %eax, %ecx movl %ecx, (%esp) call __Znam addl $12, %esp ret llvm-svn: 108927
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 1a117cab962..f236eb42538 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -656,7 +656,7 @@ private:
llvm::BasicBlock *TerminateLandingPad;
llvm::BasicBlock *TerminateHandler;
- llvm::BasicBlock *TrapBB, *ThrowLengthErrorBB;
+ llvm::BasicBlock *TrapBB;
public:
CodeGenFunction(CodeGenModule &cgm);
@@ -1544,10 +1544,6 @@ public:
/// generate a branch around the created basic block as necessary.
llvm::BasicBlock *getTrapBB();
- /// getThrowLengthErrorBB - Create a basic block that will call
- /// std::__throw_length_error to throw a std::length_error exception.
- llvm::BasicBlock *getThrowLengthErrorBB();
-
/// EmitCallArg - Emit a single call argument.
RValue EmitCallArg(const Expr *E, QualType ArgType);
OpenPOWER on IntegriCloud