[llvm-commits] [llvm] r79873 - in /llvm/trunk/lib: CodeGen/LiveVariables.cpp System/Unix/Path.inc Target/ARM/ARMJITInfo.cpp Target/Alpha/AlphaJITInfo.cpp Target/X86/X86JITInfo.cpp
Chris Lattner
sabre at nondot.org
Sun Aug 23 15:57:38 PDT 2009
Author: lattner
Date: Sun Aug 23 17:57:38 2009
New Revision: 79873
URL: http://llvm.org/viewvc/llvm-project?rev=79873&view=rev
Log:
remove the last uses of Config/alloca.h
Modified:
llvm/trunk/lib/CodeGen/LiveVariables.cpp
llvm/trunk/lib/System/Unix/Path.inc
llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp
llvm/trunk/lib/Target/Alpha/AlphaJITInfo.cpp
llvm/trunk/lib/Target/X86/X86JITInfo.cpp
Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=79873&r1=79872&r2=79873&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Sun Aug 23 17:57:38 2009
@@ -37,7 +37,6 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/STLExtras.h"
-#include "llvm/Config/alloca.h"
#include <algorithm>
using namespace llvm;
Modified: llvm/trunk/lib/System/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Path.inc?rev=79873&r1=79872&r2=79873&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Path.inc (original)
+++ llvm/trunk/lib/System/Unix/Path.inc Sun Aug 23 17:57:38 2009
@@ -16,7 +16,7 @@
//=== is guaranteed to work on *all* UNIX variants.
//===----------------------------------------------------------------------===//
-#include "llvm/Config/alloca.h"
+#include "llvm/ADT/SmallVector.h"
#include "Unix.h"
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -400,7 +400,9 @@
bool Path::getMagicNumber(std::string& Magic, unsigned len) const {
assert(len < 1024 && "Request for magic string too long");
- char* buf = (char*) alloca(1 + len);
+ SmallVector<char, 128> Buf;
+ Buf.resize(1 + len);
+ char* buf = Buf.data();
int fd = ::open(path.c_str(), O_RDONLY);
if (fd < 0)
return false;
@@ -829,7 +831,9 @@
// Append an XXXXXX pattern to the end of the file for use with mkstemp,
// mktemp or our own implementation.
- char *FNBuffer = (char*) alloca(path.size()+8);
+ SmallVector<char, 128> Buf;
+ Buf.resize(path.size()+8);
+ char *FNBuffer = Buf.data();
path.copy(FNBuffer,path.size());
if (isDirectory())
strcpy(FNBuffer+path.size(), "/XXXXXX");
Modified: llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?rev=79873&r1=79872&r2=79873&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Sun Aug 23 17:57:38 2009
@@ -19,7 +19,6 @@
#include "ARMSubtarget.h"
#include "llvm/Function.h"
#include "llvm/CodeGen/JITCodeEmitter.h"
-#include "llvm/Config/alloca.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
Modified: llvm/trunk/lib/Target/Alpha/AlphaJITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaJITInfo.cpp?rev=79873&r1=79872&r2=79873&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Alpha/AlphaJITInfo.cpp (original)
+++ llvm/trunk/lib/Target/Alpha/AlphaJITInfo.cpp Sun Aug 23 17:57:38 2009
@@ -16,7 +16,6 @@
#include "AlphaRelocations.h"
#include "llvm/Function.h"
#include "llvm/CodeGen/JITCodeEmitter.h"
-#include "llvm/Config/alloca.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
Modified: llvm/trunk/lib/Target/X86/X86JITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86JITInfo.cpp?rev=79873&r1=79872&r2=79873&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86JITInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86JITInfo.cpp Sun Aug 23 17:57:38 2009
@@ -16,7 +16,6 @@
#include "X86Relocations.h"
#include "X86Subtarget.h"
#include "llvm/Function.h"
-#include "llvm/Config/alloca.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include <cstdlib>
More information about the llvm-commits
mailing list