Move lib/Archive to tools/llvm-ar.

llvm-ar is the only tool that needs to write archive files. Every other tool
should be able to use the lib/Object interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2013-06-17 15:47:20 +00:00
parent 5cd6db9a51
commit 8496faea07
15 changed files with 16 additions and 59 deletions

View File

@ -1,5 +0,0 @@
add_llvm_library(LLVMArchive
Archive.cpp
ArchiveReader.cpp
ArchiveWriter.cpp
)

View File

@ -1,22 +0,0 @@
;===- ./lib/Archive/LLVMBuild.txt ------------------------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;
[component_0]
type = Library
name = Archive
parent = Libraries
required_libraries = BitReader Core Support

View File

@ -1,17 +0,0 @@
##===- lib/Archive/Makefile --------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
LIBRARYNAME = LLVMArchive
# We only want an archive so only those modules actually used by a tool are
# included.
BUILD_ARCHIVE := 1
include $(LEVEL)/Makefile.common

View File

@ -14,4 +14,3 @@ add_subdirectory(DebugInfo)
add_subdirectory(ExecutionEngine)
add_subdirectory(Target)
add_subdirectory(AsmParser)
add_subdirectory(Archive)

View File

@ -16,7 +16,7 @@
;===------------------------------------------------------------------------===;
[common]
subdirectories = Analysis Archive AsmParser Bitcode CodeGen DebugInfo ExecutionEngine Linker IR IRReader MC Object Option Support TableGen Target Transforms
subdirectories = Analysis AsmParser Bitcode CodeGen DebugInfo ExecutionEngine Linker IR IRReader MC Object Option Support TableGen Target Transforms
[component_0]
type = Group

View File

@ -10,7 +10,7 @@ LEVEL = ..
include $(LEVEL)/Makefile.config
PARALLEL_DIRS := IR AsmParser Bitcode Archive Analysis Transforms CodeGen \
PARALLEL_DIRS := IR AsmParser Bitcode Analysis Transforms CodeGen \
Target ExecutionEngine Linker MC Object Option DebugInfo \
IRReader

View File

@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/Bitcode/Archive.h"
#include "Archive.h"
#include "ArchiveInternals.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/Module.h"

View File

@ -14,8 +14,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_BITCODE_ARCHIVE_H
#define LLVM_BITCODE_ARCHIVE_H
#ifndef TOOLS_LLVM_AR_ARCHIVE_H
#define TOOLS_LLVM_AR_ARCHIVE_H
#include "llvm/ADT/ilist.h"
#include "llvm/ADT/ilist_node.h"

View File

@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
#ifndef LIB_ARCHIVE_ARCHIVEINTERNALS_H
#define LIB_ARCHIVE_ARCHIVEINTERNALS_H
#ifndef TOOLS_LLVM_AR_ARCHIVEINTERNALS_H
#define TOOLS_LLVM_AR_ARCHIVEINTERNALS_H
#include "Archive.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Bitcode/Archive.h"
#include "llvm/Support/TimeValue.h"
#include <cstring>

View File

@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/Bitcode/Archive.h"
#include "Archive.h"
#include "ArchiveInternals.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallPtrSet.h"

View File

@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/Bitcode/Archive.h"
#include "Archive.h"
#include "ArchiveInternals.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Bitcode/ReaderWriter.h"

View File

@ -1,7 +1,10 @@
set(LLVM_LINK_COMPONENTS archive)
set(LLVM_LINK_COMPONENTS support bitreader)
add_llvm_tool(llvm-ar
llvm-ar.cpp
ArchiveWriter.cpp
ArchiveReader.cpp
Archive.cpp
)
# TODO: Support check-local.

View File

@ -19,4 +19,3 @@
type = Tool
name = llvm-ar
parent = Tools
required_libraries = Archive

View File

@ -9,7 +9,7 @@
LEVEL := ../..
TOOLNAME := llvm-ar
LINK_COMPONENTS := archive
LINK_COMPONENTS := bitreader support
# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS := 1

View File

@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
#include "Archive.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Bitcode/Archive.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"