[llvm-commits] CVS: llvm/tools/lli/lli.cpp

Reid Spencer rspencer at reidspencer.com
Sun Jan 7 19:47:06 PST 2007


Chris,

This patch breaks:
   SingleSource/UnitTests/2003-05-14-AtExit
for sure and possibly:
   External/SPEC/CINT2000/252.eon/252.eon

Please revert or fix.

Reid.

On Sun, 2007-01-07 at 00:43 -0600, Chris Lattner wrote:
> 
> Changes in directory llvm/tools/lli:
> 
> lli.cpp updated: 1.63 -> 1.64
> ---
> Log message:
> 
> this is an overcomplex way to call exit :)
> 
> 
> ---
> Diffs of the changes:  (+1 -12)
> 
>  lli.cpp |   13 +------------
>  1 files changed, 1 insertion(+), 12 deletions(-)
> 
> 
> Index: llvm/tools/lli/lli.cpp
> diff -u llvm/tools/lli/lli.cpp:1.63 llvm/tools/lli/lli.cpp:1.64
> --- llvm/tools/lli/lli.cpp:1.63	Sun Dec 31 00:02:26 2006
> +++ llvm/tools/lli/lli.cpp	Sun Jan  7 00:43:08 2007
> @@ -118,18 +118,7 @@
>      // Run static destructors.
>      EE->runStaticConstructorsDestructors(true);
>      
> -    // If the program didn't explicitly call exit, call exit now, for the
> -    // program. This ensures that any atexit handlers get called correctly.
> -    Function *Exit = MP->getModule()->getOrInsertFunction("exit", Type::VoidTy,
> -                                                          Type::Int32Ty,
> -                                                          (Type *)0);
> -
> -    std::vector<GenericValue> Args;
> -    GenericValue ResultGV;
> -    ResultGV.Int32Val = Result;
> -    Args.push_back(ResultGV);
> -    EE->runFunction(Exit, Args);
> -
> +    exit(Result);
>      std::cerr << "ERROR: exit(" << Result << ") returned!\n";
>      abort();
>    } catch (const std::string& msg) {
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list