[llvm] r197654 - No point in having a "#if 0"ed unittest.
Rafael Espindola
rafael.espindola at gmail.com
Wed Dec 18 19:44:14 PST 2013
Author: rafael
Date: Wed Dec 18 21:44:13 2013
New Revision: 197654
URL: http://llvm.org/viewvc/llvm-project?rev=197654&view=rev
Log:
No point in having a "#if 0"ed unittest.
It is also not clear what the value of the test was. The API is used from
existing tools and can (and is) tested with lit.
Removed:
llvm/trunk/unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp
llvm/trunk/unittests/ArchiveFileDescriptor/CMakeLists.txt
llvm/trunk/unittests/ArchiveFileDescriptor/Makefile
Modified:
llvm/trunk/unittests/CMakeLists.txt
llvm/trunk/unittests/Makefile
Removed: llvm/trunk/unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp?rev=197653&view=auto
==============================================================================
--- llvm/trunk/unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp (original)
+++ llvm/trunk/unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp (removed)
@@ -1,55 +0,0 @@
-//===- llvm/unittest/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp ------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Object/Archive.h"
-#include "llvm/Object/ObjectFile.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "gtest/gtest.h"
-
-using namespace llvm;
-using namespace llvm::object;
-
-static void failIfError(error_code EC) {
- if (!EC)
- return;
-
- errs() << "ERROR: " << EC.message() << "\n";
- exit(1);
-}
-
-TEST(ArchiveFileDescriptor, Test1) {
-#if 0 // FIXME: It may be reverted.
- int FD;
-
- error_code EC = sys::fs::openFileForRead("ArchiveFileDescriptor", FD);
- failIfError(EC);
-
- OwningPtr<MemoryBuffer> MemoryBuffer;
- EC = MemoryBuffer::getOpenFile(FD, "Dummy Filename",
- MemoryBuffer,
- /* FileSize */ -1,
- /* RequiresNullTerminator */ false);
- failIfError(EC);
-
- // Attempt to open the binary.
- OwningPtr<Binary> Binary;
- EC = createBinary(MemoryBuffer.take(), Binary);
- failIfError(EC);
-
- if (Archive *Arc = dyn_cast<Archive>(Binary.get())) {
- (void)Arc;
- errs() << "ERROR: Loaded archive, was expecting object file\n";
- } else if (ObjectFile *Obj = dyn_cast<ObjectFile>(Binary.get())) {
- (void)Obj;
- } else {
- outs() << "ERROR: Unknown file type\n";
- exit(1);
- }
-#endif
-}
Removed: llvm/trunk/unittests/ArchiveFileDescriptor/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ArchiveFileDescriptor/CMakeLists.txt?rev=197653&view=auto
==============================================================================
--- llvm/trunk/unittests/ArchiveFileDescriptor/CMakeLists.txt (original)
+++ llvm/trunk/unittests/ArchiveFileDescriptor/CMakeLists.txt (removed)
@@ -1,8 +0,0 @@
-set(LLVM_LINK_COMPONENTS
- Object
- Support
- )
-
-add_llvm_unittest(ArchiveFileDescriptorTests
- ArchiveFileDescriptor.cpp
- )
Removed: llvm/trunk/unittests/ArchiveFileDescriptor/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ArchiveFileDescriptor/Makefile?rev=197653&view=auto
==============================================================================
--- llvm/trunk/unittests/ArchiveFileDescriptor/Makefile (original)
+++ llvm/trunk/unittests/ArchiveFileDescriptor/Makefile (removed)
@@ -1,15 +0,0 @@
-##===- unittests/ArchiveFileDescriptor/Makefile ------------*- Makefile -*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-
-LEVEL = ../..
-TESTNAME = ArchiveFileDescriptor
-LINK_COMPONENTS := object
-
-include $(LEVEL)/Makefile.config
-include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
Modified: llvm/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CMakeLists.txt?rev=197654&r1=197653&r2=197654&view=diff
==============================================================================
--- llvm/trunk/unittests/CMakeLists.txt (original)
+++ llvm/trunk/unittests/CMakeLists.txt Wed Dec 18 21:44:13 2013
@@ -7,7 +7,6 @@ endfunction()
add_subdirectory(ADT)
add_subdirectory(Analysis)
-add_subdirectory(ArchiveFileDescriptor)
add_subdirectory(Bitcode)
add_subdirectory(CodeGen)
add_subdirectory(DebugInfo)
Modified: llvm/trunk/unittests/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Makefile?rev=197654&r1=197653&r2=197654&view=diff
==============================================================================
--- llvm/trunk/unittests/Makefile (original)
+++ llvm/trunk/unittests/Makefile Wed Dec 18 21:44:13 2013
@@ -9,7 +9,7 @@
LEVEL = ..
-PARALLEL_DIRS = ADT Analysis ArchiveFileDescriptor Bitcode CodeGen DebugInfo \
+PARALLEL_DIRS = ADT Analysis Bitcode CodeGen DebugInfo \
ExecutionEngine IR MC Object Option Support Transforms
include $(LEVEL)/Makefile.common
More information about the llvm-commits
mailing list