Path: blob/main/contrib/llvm-project/lld/Common/Utils.cpp
213726 views
//===- Utils.cpp ------------------------------------------------*- C++-*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//===----------------------------------------------------------------------===//6//7// The file defines utils functions that can be shared across archs.8//9//===----------------------------------------------------------------------===//1011#include "lld/Common/Utils.h"1213using namespace llvm;14using namespace lld;1516StringRef lld::utils::getRootSymbol(StringRef name) {17name.consume_back(".Tgm");18auto [P0, S0] = name.rsplit(".llvm.");19auto [P1, S1] = P0.rsplit(".__uniq.");20return P1;21}222324