mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 00:16:25 +00:00
Since the old llvmc was removed, rename llvmc2 to llvmc.
llvm-svn: 60048
This commit is contained in:
parent
bcf77dcb9a
commit
89bfeb825b
@ -1,4 +1,4 @@
|
||||
// RUN: llvmc2 -c -emit-llvm -o - %s | llvm-dis | grep "@f0()" | count 1
|
||||
// RUN: llvmc -c -emit-llvm -o - %s | llvm-dis | grep "@f0()" | count 1
|
||||
|
||||
int f0(void) {
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Test that we can compile .c files as C++ and vice versa
|
||||
// RUN: llvmc2 -x c++ %s -x c %p/test_data/false.cpp -x lisp -x whatnot -x none %p/test_data/false2.cpp -o %t
|
||||
// RUN: llvmc -x c++ %s -x c %p/test_data/false.cpp -x lisp -x whatnot -x none %p/test_data/false2.cpp -o %t
|
||||
// RUN: ./%t | grep hello
|
||||
|
||||
#include <iostream>
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Check that we can compile helloworld
|
||||
* RUN: llvmc2 %s -o %t
|
||||
* RUN: llvmc %s -o %t
|
||||
* RUN: ./%t | grep hello
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Test that we can compile C++ code.
|
||||
// RUN: llvmc2 %s -o %t
|
||||
// RUN: llvmc %s -o %t
|
||||
// RUN: ./%t | grep hello
|
||||
#include <iostream>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Check that we can compile helloworld
|
||||
* RUN: llvmc2 %s -o %t
|
||||
* RUN: llvmc %s -o %t
|
||||
* RUN: ./%t | grep hello
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Test that we can compile Objective-C++ code.
|
||||
// RUN: llvmc2 %s -o %t
|
||||
// RUN: llvmc %s -o %t
|
||||
// RUN: ./%t | grep hello
|
||||
#include <iostream>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Check that the 'include' options work.
|
||||
* RUN: echo "int x;\n" > %t1.inc
|
||||
* RUN: llvmc2 -include %t1.inc -fsyntax-only %s
|
||||
* RUN: llvmc -include %t1.inc -fsyntax-only %s
|
||||
*/
|
||||
|
||||
int f0(void) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Check that the -opt switch works.
|
||||
* RUN: llvmc2 %s -opt -o %t
|
||||
* RUN: llvmc %s -opt -o %t
|
||||
* RUN: ./%t | grep hello
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Check that the 'sink' options work.
|
||||
* RUN: llvmc2 -v -Wall %s -o %t |& grep "Wall"
|
||||
* RUN: llvmc -v -Wall %s -o %t |& grep "Wall"
|
||||
* RUN: ./%t | grep hello
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Check that we can compile files of different types together.
|
||||
// RUN: llvmc2 %s %p/test_data/together.c -o %t
|
||||
// RUN: llvmc %s %p/test_data/together.c -o %t
|
||||
// RUN: ./%t | grep hello
|
||||
|
||||
extern "C" void test();
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Check that -Wall works as intended
|
||||
* RUN: llvmc2 -Wall %s -o %t
|
||||
* RUN: llvmc -Wall %s -o %t
|
||||
* RUN: ./%t | grep hello
|
||||
*/
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
##===- tools/Makefile --------------------------------------*- Makefile -*-===##
|
||||
#
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
LEVEL := ..
|
||||
# NOTE: The tools are organized into five groups of four consisting of one
|
||||
# large and three small executables. This is done to minimize memory load
|
||||
# NOTE: The tools are organized into five groups of four consisting of one
|
||||
# large and three small executables. This is done to minimize memory load
|
||||
# in parallel builds. Please retain this ordering.
|
||||
PARALLEL_DIRS := llvm-config \
|
||||
opt llvm-as llvm-dis \
|
||||
llc llvm-ranlib llvm-ar llvm-nm \
|
||||
llvm-ld llvm-prof llvm-link \
|
||||
lli gccas gccld llvm-extract llvm-db \
|
||||
bugpoint llvm-bcanalyzer llvm-stub llvmc2
|
||||
bugpoint llvm-bcanalyzer llvm-stub llvmc
|
||||
|
||||
|
||||
include $(LEVEL)/Makefile.config
|
||||
|
@ -1,4 +1,4 @@
|
||||
##===- tools/llvmc2/Makefile -------------------------------*- Makefile -*-===##
|
||||
##===- tools/llvmc/Makefile --------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
@ -10,7 +10,7 @@
|
||||
LEVEL = ../..
|
||||
|
||||
BUILTIN_PLUGINS = Base
|
||||
DRIVER_NAME = llvmc2
|
||||
DRIVER_NAME = llvmc
|
||||
DIRS = plugins driver
|
||||
|
||||
export BUILTIN_PLUGINS
|
@ -31,7 +31,7 @@ although there are some small differences. Most of the time, however,
|
||||
you shouldn't be able to notice them::
|
||||
|
||||
$ # This works as expected:
|
||||
$ llvmc2 -O3 -Wall hello.cpp
|
||||
$ llvmc -O3 -Wall hello.cpp
|
||||
$ ./a.out
|
||||
hello
|
||||
|
||||
@ -43,7 +43,7 @@ extensions). If you want to force files ending with ".c" to compile as
|
||||
C++, use the ``-x`` option, just like you would do it with ``gcc``::
|
||||
|
||||
$ # hello.c is really a C++ file
|
||||
$ llvmc2 -x c++ hello.c
|
||||
$ llvmc -x c++ hello.c
|
||||
$ ./a.out
|
||||
hello
|
||||
|
||||
@ -51,10 +51,10 @@ On the other hand, when using LLVMC as a linker to combine several C++
|
||||
object files you should provide the ``--linker`` option since it's
|
||||
impossible for LLVMC to choose the right linker in that case::
|
||||
|
||||
$ llvmc2 -c hello.cpp
|
||||
$ llvmc2 hello.o
|
||||
$ llvmc -c hello.cpp
|
||||
$ llvmc hello.o
|
||||
[A lot of link-time errors skipped]
|
||||
$ llvmc2 --linker=c++ hello.o
|
||||
$ llvmc --linker=c++ hello.o
|
||||
$ ./a.out
|
||||
hello
|
||||
|
||||
@ -138,7 +138,7 @@ directory and run ``make``. The resulting file will be called
|
||||
|
||||
$ cd $LLVMC_DIR/plugins/Simple
|
||||
$ make
|
||||
$ llvmc2 -load $LLVM_DIR/Release/lib/LLVMCSimple.so
|
||||
$ llvmc -load $LLVM_DIR/Release/lib/LLVMCSimple.so
|
||||
|
||||
Sometimes, you will want a 'bare-bones' version of LLVMC that has no
|
||||
built-in plugins. It can be compiled with the following command::
|
||||
@ -229,7 +229,7 @@ which gets a special treatment - there you are allowed to specify one
|
||||
default edge *per language*).
|
||||
|
||||
To get a visual representation of the compilation graph (useful for
|
||||
debugging), run ``llvmc2 --view-graph``. You will need ``dot`` and
|
||||
debugging), run ``llvmc --view-graph``. You will need ``dot`` and
|
||||
``gsview`` installed for this to work properly.
|
||||
|
||||
|
@ -20,7 +20,7 @@ Compiling with LLVMC
|
||||
In general, LLVMC tries to be command-line compatible with ``gcc`` as
|
||||
much as possible, so most of the familiar options work::
|
||||
|
||||
$ llvmc2 -O3 -Wall hello.cpp
|
||||
$ llvmc -O3 -Wall hello.cpp
|
||||
$ ./a.out
|
||||
hello
|
||||
|
||||
@ -38,7 +38,7 @@ be familiar with it to get anything done.
|
||||
Start by compiling ``plugins/Simple/Simple.td``, which is a primitive
|
||||
wrapper for ``gcc``::
|
||||
|
||||
$ cd $LLVM_DIR/tools/llvmc2
|
||||
$ cd $LLVM_DIR/tools/llvmc
|
||||
$ make DRIVER_NAME=mygcc BUILTIN_PLUGINS=Simple
|
||||
$ cat > hello.c
|
||||
[...]
|
||||
@ -98,4 +98,3 @@ References
|
||||
|
||||
.. [1] TableGen Fundamentals
|
||||
http://llvm.cs.uiuc.edu/docs/TableGenFundamentals.html
|
||||
|
21
tools/llvmc/doc/Makefile
Normal file
21
tools/llvmc/doc/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
##===- tools/llvmc/doc/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
RST2HTML=rst2html --stylesheet=llvm.css --link-stylesheet
|
||||
|
||||
all : LLVMC-Reference.html LLVMC-Tutorial.html
|
||||
|
||||
LLVMC-Tutorial.html : LLVMC-Tutorial.rst llvm.css
|
||||
$(RST2HTML) $< $@
|
||||
|
||||
LLVMC-Reference.html : LLVMC-Reference.rst llvm.css
|
||||
$(RST2HTML) $< $@
|
||||
|
||||
clean :
|
||||
rm *.html
|
Before Width: | Height: | Size: 91 B After Width: | Height: | Size: 91 B |
@ -1,4 +1,4 @@
|
||||
##===- tools/llvmc2/src/Makefile ---------------------------*- Makefile -*-===##
|
||||
##===- tools/llvmc/driver/Makefile -------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Plugin support for llvmc2.
|
||||
// Plugin support.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -1,4 +1,4 @@
|
||||
##===- tools/llvmc2/plugins/Base/Makefile ------------------*- Makefile -*-===##
|
||||
##===- tools/llvmc/plugins/Base/Makefile -------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
@ -83,4 +83,3 @@ def CompilationGraph : CompilationGraph<[
|
||||
Edge<"clang_cpp", "llvm_ld">,
|
||||
Edge<"clang_objective_c", "llvm_ld">
|
||||
]>;
|
||||
|
@ -1,4 +1,4 @@
|
||||
##===- tools/llvmc2/plugins/Clang/Makefile -----------------*- Makefile -*-===##
|
||||
##===- tools/llvmc/plugins/Clang/Makefile ------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
@ -11,4 +11,3 @@ LLVMC_PLUGIN = Clang
|
||||
BUILT_SOURCES = AutoGenerated.inc
|
||||
|
||||
include ../Makefile
|
||||
|
@ -28,5 +28,3 @@ struct MyPlugin : public llvmc::BasePlugin {
|
||||
static llvmc::RegisterPlugin<MyPlugin> RP("Hello", "Hello World plugin");
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
##===- tools/llvmc2/plugins/Hello/Makefile -----------------*- Makefile -*-===##
|
||||
##===- tools/llvmc/plugins/Hello/Makefile ------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
@ -1,4 +1,4 @@
|
||||
##===- tools/llvmc2/plugins/Makefile.plugins ----------------*- Makefile -*-===##
|
||||
##===- tools/llvmc/plugins/Makefile.plugins ----------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
@ -1,4 +1,4 @@
|
||||
##===- tools/llvmc2/plugins/Simple/Makefile ------------------*- Makefile -*-===##
|
||||
##===- tools/llvmc/plugins/Simple/Makefile -----------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
@ -1,13 +0,0 @@
|
||||
|
||||
RST2HTML=rst2html --stylesheet=llvm.css --link-stylesheet
|
||||
|
||||
all : LLVMC-Reference.html LLVMC-Tutorial.html
|
||||
|
||||
LLVMC-Tutorial.html : LLVMC-Tutorial.rst llvm.css
|
||||
$(RST2HTML) $< $@
|
||||
|
||||
LLVMC-Reference.html : LLVMC-Reference.rst llvm.css
|
||||
$(RST2HTML) $< $@
|
||||
|
||||
clean :
|
||||
rm *.html
|
Loading…
Reference in New Issue
Block a user