Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:41

0001 //===- Reproduce.h - Utilities for creating reproducers ---------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLD_COMMON_REPRODUCE_H
0010 #define LLD_COMMON_REPRODUCE_H
0011 
0012 #include "lld/Common/LLVM.h"
0013 #include "llvm/ADT/StringRef.h"
0014 #include "llvm/Support/Error.h"
0015 
0016 namespace llvm {
0017 namespace opt { class Arg; }
0018 }
0019 
0020 namespace lld {
0021 
0022 // Makes a given pathname an absolute path first, and then remove
0023 // beginning /. For example, "../foo.o" is converted to "home/john/foo.o",
0024 // assuming that the current directory is "/home/john/bar".
0025 std::string relativeToRoot(StringRef path);
0026 
0027 // Quote a given string if it contains a space character.
0028 std::string quote(StringRef s);
0029 
0030 // Returns the string form of the given argument.
0031 std::string toString(const llvm::opt::Arg &arg);
0032 }
0033 
0034 #endif