diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-07-31 19:12:33 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-07-31 19:12:33 +0000 |
commit | 66e7a979996b89918f7a7c1641c275b0a84b7938 (patch) | |
tree | e7145ebdc0dff10bbf725c9ce8f8f78c763488c0 /unittests/MC/AsmStreamerTest.cpp | |
parent | e243729b3d0ddc46b145a93de67dc466df1ed386 (diff) | |
download | external_llvm-66e7a979996b89918f7a7c1641c275b0a84b7938.zip external_llvm-66e7a979996b89918f7a7c1641c275b0a84b7938.tar.gz external_llvm-66e7a979996b89918f7a7c1641c275b0a84b7938.tar.bz2 |
Adjust unit test for the MCSection changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/MC/AsmStreamerTest.cpp')
-rw-r--r-- | unittests/MC/AsmStreamerTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/unittests/MC/AsmStreamerTest.cpp b/unittests/MC/AsmStreamerTest.cpp index 053b7f3..3bf05cb 100644 --- a/unittests/MC/AsmStreamerTest.cpp +++ b/unittests/MC/AsmStreamerTest.cpp @@ -9,6 +9,7 @@ #include "gtest/gtest.h" #include "llvm/MC/MCContext.h" +#include "llvm/MC/MCSection.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCValue.h" #include "llvm/Support/raw_ostream.h" @@ -45,14 +46,14 @@ TEST(AsmStreamer, EmptyOutput) { TEST(AsmStreamer, Sections) { StringAsmStreamer S; - MCSection *Sec0 = S.getContext().GetSection("foo"); + MCSection *Sec0 = MCSection::Create("foo", S.getContext()); S.getStreamer().SwitchSection(Sec0); EXPECT_EQ(".section foo\n", S.getString()); } TEST(AsmStreamer, Values) { StringAsmStreamer S; - MCSection *Sec0 = S.getContext().GetSection("foo"); + MCSection *Sec0 = MCSection::Create("foo", S.getContext()); MCSymbol *A = S.getContext().CreateSymbol("a"); MCSymbol *B = S.getContext().CreateSymbol("b"); S.getStreamer().SwitchSection(Sec0); @@ -73,7 +74,7 @@ b:\n\ TEST(AsmStreamer, Align) { StringAsmStreamer S; - MCSection *Sec0 = S.getContext().GetSection("foo"); + MCSection *Sec0 = MCSection::Create("foo", S.getContext()); S.getStreamer().SwitchSection(Sec0); S.getStreamer().EmitValueToAlignment(4); S.getStreamer().EmitValueToAlignment(4, /*Value=*/12, /*ValueSize=*/2); @@ -87,7 +88,7 @@ TEST(AsmStreamer, Align) { TEST(AsmStreamer, Org) { StringAsmStreamer S; - MCSection *Sec0 = S.getContext().GetSection("foo"); + MCSection *Sec0 = MCSection::Create("foo", S.getContext()); S.getStreamer().SwitchSection(Sec0); MCSymbol *A = S.getContext().CreateSymbol("a"); S.getStreamer().EmitLabel(A); |