mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of an autoconf test later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6723 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5c91898e57
commit
ad95d9ef50
30
include/Support/Alloca.h
Normal file
30
include/Support/Alloca.h
Normal file
@ -0,0 +1,30 @@
|
||||
//===-- include/Support/Alloca.h - Support for alloca header -----*- C++ -*--=//
|
||||
//
|
||||
// Some platforms do not have alloca.h; others do. You can include this
|
||||
// file instead of <alloca.h> and it will include <alloca.h> on the platforms
|
||||
// that require you to do so to use alloca().
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_SUPPORT_ALLOCA_H
|
||||
#define LLVM_SUPPORT_ALLOCA_H
|
||||
|
||||
// TODO: Determine HAVE_ALLOCA_H based on autoconf results.
|
||||
// The following method is too brittle.
|
||||
#if defined(HAVE_ALLOCA_H)
|
||||
#undef HAVE_ALLOCA_H
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#elif defined(__sparc__)
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#elif defined(__FreeBSD__)
|
||||
// not defined here
|
||||
#endif
|
||||
|
||||
#if HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
||||
#endif /* LLVM_SUPPORT_ALLOCA_H */
|
@ -21,7 +21,7 @@
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "Support/STLExtras.h"
|
||||
#include <alloca.h>
|
||||
#include "Support/Alloca.h"
|
||||
using std::cerr;
|
||||
using std::vector;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <alloca.h>
|
||||
#include "Support/Alloca.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "Support/STLExtras.h"
|
||||
#include <alloca.h>
|
||||
#include "Support/Alloca.h"
|
||||
using std::cerr;
|
||||
using std::vector;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/Value.h"
|
||||
#include "Support/Statistic.h"
|
||||
#include <alloca.h>
|
||||
#include "Support/Alloca.h"
|
||||
|
||||
namespace {
|
||||
Statistic<>
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <alloca.h>
|
||||
#include "Support/Alloca.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <alloca.h>
|
||||
#include "Support/Alloca.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user