2 changes: 1 addition & 1 deletion llvm/lib/Bitcode/Reader/MetadataLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/Bitcode/LLVMBitCodes.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Bitcode/BitCodes.h"
#include "llvm/Bitcode/BitstreamWriter.h"
#include "llvm/Bitstream/BitCodes.h"
#include "llvm/Bitstream/BitstreamWriter.h"
#include "llvm/Bitcode/LLVMBitCodes.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Attributes.h"
Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/Bitstream/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(Reader)
# The writer is header-only.
23 changes: 23 additions & 0 deletions llvm/lib/Bitstream/LLVMBuild.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
;===- ./lib/Bitstream/LLVMBuild.txt ----------------------------*- Conf -*--===;
;
; Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
; See https://llvm.org/LICENSE.txt for license information.
; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
;
;===------------------------------------------------------------------------===;
;
; 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
;
;===------------------------------------------------------------------------===;

[common]
subdirectories = Reader

[component_0]
type = Group
name = Bitstream
parent = Libraries
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/ADT/StringRef.h"
#include <cassert>
#include <string>
Expand Down
7 changes: 7 additions & 0 deletions llvm/lib/Bitstream/Reader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_llvm_library(LLVMBitstreamReader
BitstreamReader.cpp

ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Bitcode
${LLVM_MAIN_INCLUDE_DIR}/llvm/Bitstream
)
21 changes: 21 additions & 0 deletions llvm/lib/Bitstream/Reader/LLVMBuild.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
;===- ./lib/Bitstream/Reader/LLVMBuild.txt ---------------------*- Conf -*--===;
;
; Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
; See https://llvm.org/LICENSE.txt for license information.
; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
;
;===------------------------------------------------------------------------===;
;
; 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 = BitstreamReader
parent = Bitstream
required_libraries = Support
1 change: 1 addition & 0 deletions llvm/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ add_subdirectory(IRReader)
add_subdirectory(CodeGen)
add_subdirectory(BinaryFormat)
add_subdirectory(Bitcode)
add_subdirectory(Bitstream)
add_subdirectory(Transforms)
add_subdirectory(Linker)
add_subdirectory(Analysis)
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/LLVMBuild.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ subdirectories =
Analysis
AsmParser
Bitcode
Bitstream
CodeGen
DebugInfo
Demangle
Expand Down
1 change: 1 addition & 0 deletions llvm/tools/llvm-bcanalyzer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(LLVM_LINK_COMPONENTS
BitReader
BitstreamReader
Support
)

Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-bcanalyzer/LLVMBuild.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
type = Tool
name = llvm-bcanalyzer
parent = Tools
required_libraries = BitReader
required_libraries = BitReader BitstreamReader Support
2 changes: 1 addition & 1 deletion llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "llvm/ADT/StringExtras.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/Bitcode/LLVMBitCodes.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Format.h"
Expand Down
2 changes: 0 additions & 2 deletions llvm/unittests/Bitcode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ set(LLVM_LINK_COMPONENTS

add_llvm_unittest(BitcodeTests
BitReaderTest.cpp
BitstreamReaderTest.cpp
BitstreamWriterTest.cpp
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//
//===----------------------------------------------------------------------===//

#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Bitcode/BitstreamWriter.h"
#include "llvm/Bitstream/BitstreamWriter.h"
#include "gtest/gtest.h"

using namespace llvm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "llvm/Bitcode/BitstreamWriter.h"
#include "llvm/Bitstream/BitstreamWriter.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "gtest/gtest.h"
Expand Down
8 changes: 8 additions & 0 deletions llvm/unittests/Bitstream/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(LLVM_LINK_COMPONENTS
BitstreamReader
)

add_llvm_unittest(BitstreamTests
BitstreamReaderTest.cpp
BitstreamWriterTest.cpp
)
1 change: 1 addition & 0 deletions llvm/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ add_subdirectory(Analysis)
add_subdirectory(AsmParser)
add_subdirectory(BinaryFormat)
add_subdirectory(Bitcode)
add_subdirectory(Bitstream)
add_subdirectory(CodeGen)
add_subdirectory(DebugInfo)
add_subdirectory(Demangle)
Expand Down
4 changes: 4 additions & 0 deletions llvm/utils/GenLibDeps.pl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
$libpath =~ s/^AsmPrinter/CodeGen\/AsmPrinter/;
$libpath =~ s/^BitReader/Bitcode\/Reader/;
$libpath =~ s/^BitWriter/Bitcode\/Writer/;
$libpath =~ s/^BitstreamReader/Bitstream\/Reader/;
$libpath =~ s/^BitstreamWriter/Bitstream\/Writer/;
$libpath =~ s/^MSIL/Target\/MSIL/;
$libpath =~ s/^Core/IR/;
$libpath =~ s/^Instrumentation/Transforms\/Instrumentation/;
Expand Down Expand Up @@ -136,6 +138,8 @@
$libpath =~ s/^AsmPrinter/CodeGen\/AsmPrinter/;
$libpath =~ s/^BitReader/Bitcode\/Reader/;
$libpath =~ s/^BitWriter/Bitcode\/Writer/;
$libpath =~ s/^BitstreamReader/Bitstream\/Reader/;
$libpath =~ s/^BitstreamWriter/Bitstream\/Writer/;
$libpath =~ s/^MSIL/Target\/MSIL/;
$libpath =~ s/^Core/VMCore/;
$libpath =~ s/^Instrumentation/Transforms\/Instrumentation/;
Expand Down